diff options
author | Jordan Hargrave <jordan_hargrave@dell.com> | 2006-04-07 13:50:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-09 14:53:53 -0400 |
commit | b20367a6c2a0cd937cb1f0a8cf848f1402fef99c (patch) | |
tree | 8624096baed40f8f89e757b2d170a7b4d1844575 /include/asm-x86_64/hpet.h | |
parent | 49c93e84d8b2d602a07c302c7e3cd4fa09095fbb (diff) |
[PATCH] x86_64: Fix drift with HPET timer enabled
If the HPET timer is enabled, the clock can drift by ~3 seconds a day.
This is due to the HPET timer not being initialized with the correct
setting (still using PIT count).
If HZ changes, this drift can become even more pronounced.
HPET patch initializes tick_nsec with correct tick_nsec settings for
HPET timer.
Vojtech comments:
"It's not entirely correct (it assumes the HPET ticks totally
exactly), but it's significantly better than assuming the PIT error
there."
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/hpet.h')
-rw-r--r-- | include/asm-x86_64/hpet.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index 08b75c15269a..18ff7ee9e774 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | #define HPET_TN_ROUTE_SHIFT 9 | 52 | #define HPET_TN_ROUTE_SHIFT 9 |
53 | 53 | ||
54 | #define HPET_TICK_RATE (HZ * 100000UL) | ||
55 | |||
54 | extern int is_hpet_enabled(void); | 56 | extern int is_hpet_enabled(void); |
55 | extern int hpet_rtc_timer_init(void); | 57 | extern int hpet_rtc_timer_init(void); |
56 | extern int oem_force_hpet_timer(void); | 58 | extern int oem_force_hpet_timer(void); |