lkml.org 
[lkml]   [2008]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC PATCH 14/30 v3] ppc clock accumulate fix

    The following is a quick and dirty fix for powerpc so it includes
    cycle_accumulated in its calculation. It relies on the fact that the
    powerpc clocksource is a 64bit counter (don't have to worry about
    multiple overflows), so the subtraction should be safe.

    Signed-off-by: John Stultz <johnstul@us.ibm.com>
    Signed-off-by: Steven Rostedt <srostedt@redhat.com>
    ---
    arch/powerpc/kernel/time.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    Index: linux-compile.git/arch/powerpc/kernel/time.c
    ===================================================================
    --- linux-compile.git.orig/arch/powerpc/kernel/time.c 2008-01-14 13:13:43.000000000 -0500
    +++ linux-compile.git/arch/powerpc/kernel/time.c 2008-01-14 13:14:13.000000000 -0500
    @@ -773,7 +773,8 @@ void update_vsyscall(struct timespec *wa
    stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
    do_div(stamp_xsec, 1000000000);
    stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
    - update_gtod(clock->cycle_last, stamp_xsec, t2x);
    + update_gtod(clock->cycle_last-clock->cycle_accumulated,
    + stamp_xsec, t2x);
    }

    void update_vsyscall_tz(void)
    --


    \
     
     \ /
      Last update: 2008-01-15 21:57    [W:4.361 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site