diff options
Diffstat (limited to 'arch/x86/kernel/hpet.c')
-rw-r--r-- | arch/x86/kernel/hpet.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index d10a7e7294f4..23b4ecdffa9b 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -400,9 +400,15 @@ static int hpet_next_event(unsigned long delta, | |||
400 | * then we might have a real hardware problem. We can not do | 400 | * then we might have a real hardware problem. We can not do |
401 | * much about it here, but at least alert the user/admin with | 401 | * much about it here, but at least alert the user/admin with |
402 | * a prominent warning. | 402 | * a prominent warning. |
403 | * An erratum on some chipsets (ICH9,..), results in comparator read | ||
404 | * immediately following a write returning old value. Workaround | ||
405 | * for this is to read this value second time, when first | ||
406 | * read returns old value. | ||
403 | */ | 407 | */ |
404 | WARN_ONCE(hpet_readl(HPET_Tn_CMP(timer)) != cnt, | 408 | if (unlikely((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt)) { |
409 | WARN_ONCE(hpet_readl(HPET_Tn_CMP(timer)) != cnt, | ||
405 | KERN_WARNING "hpet: compare register read back failed.\n"); | 410 | KERN_WARNING "hpet: compare register read back failed.\n"); |
411 | } | ||
406 | 412 | ||
407 | return (s32)(hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; | 413 | return (s32)(hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; |
408 | } | 414 | } |
@@ -1144,6 +1150,7 @@ int hpet_set_periodic_freq(unsigned long freq) | |||
1144 | do_div(clc, freq); | 1150 | do_div(clc, freq); |
1145 | clc >>= hpet_clockevent.shift; | 1151 | clc >>= hpet_clockevent.shift; |
1146 | hpet_pie_delta = clc; | 1152 | hpet_pie_delta = clc; |
1153 | hpet_pie_limit = 0; | ||
1147 | } | 1154 | } |
1148 | return 1; | 1155 | return 1; |
1149 | } | 1156 | } |