aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/ntp.c
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2008-02-10 04:48:03 -0500
committerThomas Gleixner <tglx@linutronix.de>2008-02-10 04:48:03 -0500
commite13a2e61dd5152f5499d2003470acf9c838eab84 (patch)
tree4846b2ea392773f7a92d31334295d7aadbafd83e /kernel/time/ntp.c
parent25f666300625d894ebe04bac2b4b3aadb907c861 (diff)
ntp: correct inconsistent interval/tick_length usage
clocksource initialization and error accumulation. This corrects a 280ppm drift seen on some systems using acpi_pm, and affects other clocksources as well (likely to a lesser degree). Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/ntp.c')
-rw-r--r--kernel/time/ntp.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index e64efaf957e8..c88b5910e7ab 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -43,10 +43,6 @@ long time_freq; /* frequency offset (scaled ppm)*/
43static long time_reftime; /* time at last adjustment (s) */ 43static long time_reftime; /* time at last adjustment (s) */
44long time_adjust; 44long time_adjust;
45 45
46#define CLOCK_TICK_OVERFLOW (LATCH * HZ - CLOCK_TICK_RATE)
47#define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / \
48 (s64)CLOCK_TICK_RATE)
49
50static void ntp_update_frequency(void) 46static void ntp_update_frequency(void)
51{ 47{
52 u64 second_length = (u64)(tick_usec * NSEC_PER_USEC * USER_HZ) 48 u64 second_length = (u64)(tick_usec * NSEC_PER_USEC * USER_HZ)