lkml.org 
[lkml]   [2012]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/6][RFC] Rework vsyscall to avoid truncation/rounding issue in timekeeping core
On 09/19/2012 10:03 AM, Richard Cochran wrote:
> On Wed, Sep 19, 2012 at 09:31:35AM -0700, John Stultz wrote:
>> With powerpc, there is no arch specific kernel code involved, its
>> just a data structure the kernel exports that is accessible to
>> userland. The execution logic lives in userland libraries, or
>> sometimes application code itself.
> I took a brief look at arch/powerpc/kernel/vdso32/gettimeofday.S and
> arch/powerpc/kernel/vdso64/gettimeofday.S, and I see what looks a lot
> like functions
Sorry, yes. My statement wasn't subtle enough (and I may be confusing my
history).

You are right, there is arch specific code involved, but the data
structure that is exported is considered part of the abi since some
applications access it directly.

See the comments and structure in:
arch/powerpc/include/asm/vdso_datapage.h


> $ find arch/powerpc/kernel/vdso* -name gettimeofday.S|xargs grep FUNCTION_BEGIN
>
> arch/powerpc/kernel/vdso32/gettimeofday.S:V_FUNCTION_BEGIN(__kernel_gettimeofday)
> arch/powerpc/kernel/vdso32/gettimeofday.S:V_FUNCTION_BEGIN(__kernel_clock_gettime)
> arch/powerpc/kernel/vdso32/gettimeofday.S:V_FUNCTION_BEGIN(__kernel_clock_getres)
> arch/powerpc/kernel/vdso64/gettimeofday.S:V_FUNCTION_BEGIN(__kernel_gettimeofday)
> arch/powerpc/kernel/vdso64/gettimeofday.S:V_FUNCTION_BEGIN(__kernel_clock_gettime)
> arch/powerpc/kernel/vdso64/gettimeofday.S:V_FUNCTION_BEGIN(__kernel_clock_getres)
> arch/powerpc/kernel/vdso64/gettimeofday.S:V_FUNCTION_BEGIN(__do_get_tspec)
>
> and I wonder whether these could be done in C instead.

Possibly, but I suspect they're in asm for performance reasons.

Paul/Ben: Do you have any thoughts here?

thanks
-john



\
 
 \ /
  Last update: 2012-09-19 20:41    [W:0.056 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site