[PATCH] Time: Timekeeping Fixups for 2.6.15-mm3

From: john stultz
Date: Thu Jan 12 2006 - 17:03:53 EST


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


-
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/