[PATCH] i386: fix hpet for systems that don't support legacy replacement
Currently the i386 HPET code assumes the entire HPET implementation from the spec is present. This breaks on boxes that do not implement the optional legacy timer replacement functionality portion of the spec. This patch, which is very similar to my x86-64 patch for the same issue, fixes the problem allowing i386 systems that cannot use the HPET for the timer interrupt and RTC to still use the HPET as a time source. I've tested this patch on a system systems without HPET, with HPET but without legacy timer replacement, as well as HPET with legacy timer replacement. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
5b7abc6fdc
commit
35492df5ae
@@ -477,7 +477,7 @@ static int __init init_tsc(char* override)
|
||||
if (cpu_has_tsc) {
|
||||
unsigned long tsc_quotient;
|
||||
#ifdef CONFIG_HPET_TIMER
|
||||
if (is_hpet_enabled()){
|
||||
if (is_hpet_enabled() && hpet_use_timer) {
|
||||
unsigned long result, remain;
|
||||
printk("Using TSC for gettimeofday\n");
|
||||
tsc_quotient = calibrate_tsc_hpet(NULL);
|
||||
|
Reference in New Issue
Block a user