[-mm PATCH 3/11] Time: reduced ntp rework part 2 - fix adjtimeadj

From: john stultz
Date: Tue Feb 21 2006 - 01:19:41 EST


Syncs up the time-reduced-ntp-rework-part2.patch with the adjtime_adjustment() changes.


kernel/timer.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

Index: mm-merge/kernel/timer.c
===================================================================
--- mm-merge.orig/kernel/timer.c
+++ mm-merge/kernel/timer.c
@@ -589,7 +589,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;
@@ -846,7 +845,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);
@@ -854,9 +853,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: */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/