diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 14:02:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 14:02:23 -0400 |
commit | fb1ae635772d679eb312fa447290fc02cd0e4cf1 (patch) | |
tree | 45733f9820da1190cd58bfff080edbb02af961a8 /arch/x86/kernel/hpet.c | |
parent | addb2d6c13993060ae75f5005815b19dd2abdd64 (diff) | |
parent | 472a474c6630efd195d3738339fd1bdc8aa3b1aa (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards
x86: Increase CONFIG_NODES_SHIFT max to 10
ibft, x86: Change reserve_ibft_region() to find_ibft_region()
x86, hpet: Fix bug in RTC emulation
x86, hpet: Erratum workaround for read after write of HPET comparator
bootmem, x86: Fix 32bit numa system without RAM on node 0
nobootmem, x86: Fix 32bit numa system without RAM on node 0
x86: Handle overlapping mptables
x86: Make e820_remove_range to handle all covered case
x86-32, resume: do a global tlb flush in S4 resume
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 | } |