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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux