aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorJordan Hargrave <jordan_hargrave@dell.com>2006-04-07 13:50:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-09 14:53:53 -0400
commitb20367a6c2a0cd937cb1f0a8cf848f1402fef99c (patch)
tree8624096baed40f8f89e757b2d170a7b4d1844575 /arch/x86_64
parent49c93e84d8b2d602a07c302c7e3cd4fa09095fbb (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 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/time.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 2eeaa95edff0..7392570f975d 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -917,6 +917,8 @@ void __init time_init(void)
917 vxtime.hpet_address = 0; 917 vxtime.hpet_address = 0;
918 918
919 if (hpet_use_timer) { 919 if (hpet_use_timer) {
920 /* set tick_nsec to use the proper rate for HPET */
921 tick_nsec = TICK_NSEC_HPET;
920 cpu_khz = hpet_calibrate_tsc(); 922 cpu_khz = hpet_calibrate_tsc();
921 timename = "HPET"; 923 timename = "HPET";
922#ifdef CONFIG_X86_PM_TIMER 924#ifdef CONFIG_X86_PM_TIMER