From: john stultz Syncs up the time-reduced-ntp-rework-part2.patch with the adjtime_adjustment() changes. Signed-off-by: Andrew Morton --- kernel/timer.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN kernel/timer.c~time-reduced-ntp-rework-part-2-fix-adjtimeadj kernel/timer.c --- devel/kernel/timer.c~time-reduced-ntp-rework-part-2-fix-adjtimeadj 2006-02-21 13:34:56.000000000 -0800 +++ devel-akpm/kernel/timer.c 2006-02-21 13:34:56.000000000 -0800 @@ -590,7 +590,6 @@ static long time_adj; /* tick adjust ( long time_reftime; /* time at last adjustment (s) */ long time_adjust; long time_next_adjust; -static long time_adjust_step; /* per tick time_adjust step */ static long total_sppm; /* shifted ppm sum of all adjustments */ static long offset_adj_ppm; @@ -847,7 +846,7 @@ long ntp_get_ppm_adjustment(void) void ntp_advance(unsigned long interval_ns) { static unsigned long interval_sum; - + long time_adjust_step; unsigned long flags; write_seqlock_irqsave(&ntp_lock, flags); @@ -855,9 +854,10 @@ void ntp_advance(unsigned long interval_ /* increment the interval sum: */ interval_sum += interval_ns; + time_adjust_step = adjtime_adjustment(); /* calculate the per tick singleshot adjtime adjustment step: */ while (interval_ns >= tick_nsec) { - time_adjust -= adjtime_adjustment(); + time_adjust -= time_adjust_step; interval_ns -= tick_nsec; } /* usec/tick => ppm: */ _