summaryrefslogtreecommitdiff
path: root/include/asm-i386/hpet.h
diff options
context:
space:
mode:
authorJordan Hargrave <jordan_hargrave@dell.com>2006-04-07 17:50:18 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-09 18:53:53 (GMT)
commitb20367a6c2a0cd937cb1f0a8cf848f1402fef99c (patch)
tree8624096baed40f8f89e757b2d170a7b4d1844575 /include/asm-i386/hpet.h
parent49c93e84d8b2d602a07c302c7e3cd4fa09095fbb (diff)
downloadlinux-b20367a6c2a0cd937cb1f0a8cf848f1402fef99c.tar.xz
[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-i386/hpet.h')
-rw-r--r--include/asm-i386/hpet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h
index 16ef9f9..7f1a8a6 100644
--- a/include/asm-i386/hpet.h
+++ b/include/asm-i386/hpet.h
@@ -89,6 +89,7 @@
* then 32 bit HPET counter wrapsaround in less than 0.5 sec.
*/
#define HPET_MIN_PERIOD (100000UL)
+#define HPET_TICK_RATE (HZ * 100000UL)
extern unsigned long hpet_tick; /* hpet clks count per tick */
extern unsigned long hpet_address; /* hpet memory map physical address */