linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Time: Timekeeping Fixups for 2.6.15-mm3
@ 2006-01-12 22:05 john stultz
  0 siblings, 0 replies; only message in thread
From: john stultz @ 2006-01-12 22:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

Hey Andrew,
	Below are two quick fixes I found while reviewing the timekeeping
patches currently in -mm. 

The first chunk fixes a missed return in the
time-fix-cpu-frequency-detection.patch which could possibly cause
interrupts to be disabled and never re-enabled (although the failure
case is unlikely, so this probably isn't biting anyone).

The second chunk removes a bit of code that was unnecessarily duplicated
in time-reduced-ntp-rework-part-2.patch that bumps the time_maxerror
variable each second (which is already done at the top of the function).
The code must of slipped in while moving the code in an earlier version
of the patch and didn't get removed as it should have been.

thanks
-john


linux-2.6.15-mm3_timeofday-fixups_B16.patch
===========================================
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index c86eba0..cab2546 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -158,7 +158,7 @@ static unsigned long calculate_cpu_khz(v
 
 	/* cpu freq too slow: */
 	if (delta64 <= CALIBRATE_TIME_MSEC)
-		return 0;
+		goto err;
 
 	delta64 += CALIBRATE_TIME_MSEC/2; /* round for do_div */
 	do_div(delta64,CALIBRATE_TIME_MSEC);
diff --git a/kernel/timer.c b/kernel/timer.c
index 8d10cd5..21efa12 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -745,13 +745,6 @@ static void second_overflow(void)
 		time_state = TIME_OK;
 	}
 
-	/* Bump the maxerror field */
-	time_maxerror += time_tolerance >> SHIFT_USEC;
-	if ( time_maxerror > NTP_PHASE_LIMIT ) {
-		time_maxerror = NTP_PHASE_LIMIT;
-		time_status |= STA_UNSYNC;
-	}
-
 	/*
 	 * Compute the phase adjustment for the next second. In PLL mode, the
 	 * offset is reduced by a fixed factor times the time constant. In FLL



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-12 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-12 22:05 [PATCH] Time: Timekeeping Fixups for 2.6.15-mm3 john stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).