]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/hpet-fix-for-LS21-boot-hang
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / hpet-fix-for-LS21-boot-hang
CommitLineData
00e5a55c
BS
1From: john stultz <johnstul@us.ibm.com>
2Date: Fri, 13 Feb 2009 02:48:53 +0000 (-0800)
3Subject: x86, hpet: fix for LS21 + HPET = boot hang
4Patch-mainline: 2.6.29-rc6
5Git-commit: b13e24644c138d0ddbc451403c30a96b09bfd556
6References: bnc#476877
7
8x86, hpet: fix for LS21 + HPET = boot hang
9
10Between 2.6.23 and 2.6.24-rc1 a change was made that broke IBM LS21
11systems that had the HPET enabled in the BIOS, resulting in boot hangs
12for x86_64.
13
14Specifically commit b8ce33590687888ebb900d09557b8807c4539022, which
15merges the i386 and x86_64 HPET code.
16
17Prior to this commit, when we setup the HPET timers in x86_64, we did
18the following:
19
20 hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL |
21 HPET_TN_32BIT, HPET_T0_CFG);
22
23However after the i386/x86_64 HPET merge, we do the following:
24
25 cfg = hpet_readl(HPET_Tn_CFG(timer));
26 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
27 HPET_TN_SETVAL | HPET_TN_32BIT;
28 hpet_writel(cfg, HPET_Tn_CFG(timer));
29
30However on LS21s with HPET enabled in the BIOS, the HPET_T0_CFG register
31boots with Level triggered interrupts (HPET_TN_LEVEL) enabled. This
32causes the periodic interrupt to be not so periodic, and that results in
33the boot time hang I reported earlier in the delay calibration.
34
35My fix: Always disable HPET_TN_LEVEL when setting up periodic mode.
36
37Signed-off-by: John Stultz <johnstul@us.ibm.com>
38Signed-off-by: Ingo Molnar <mingo@elte.hu>
39Acked-by: Jeff Mahoney <jeffm@suse.com>
40---
41
42---
43 arch/x86/kernel/hpet.c | 2 ++
44 1 file changed, 2 insertions(+)
45
46--- a/arch/x86/kernel/hpet.c
47+++ b/arch/x86/kernel/hpet.c
48@@ -304,6 +304,8 @@ static void hpet_legacy_set_mode(enum cl
49 now = hpet_read_value(HPET_COUNTER);
50 cmp = now + (unsigned long) delta;
51 cfg = hpet_readl(HPET_T0_CFG);
52+ /* Make sure we use edge triggered interrupts */
53+ cfg &= ~HPET_TN_LEVEL;
54 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
55 HPET_TN_SETVAL |
56 (hpet_legacy_use_64_bits ? 0 : HPET_TN_32BIT);