/[linux-patches]/genpatches-2.6/trunk/2.6.27/2200_sb600-acpi-irq0-override.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.27/2200_sb600-acpi-irq0-override.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1409 - (show annotations) (download) (as text)
Wed Nov 26 10:29:07 2008 UTC (12 years ago) by dsd
File MIME type: text/x-diff
File size: 3328 byte(s)
Fix ACPI-related performance degradation on HP laptops
1 From: Andreas Herrmann <andreas.herrmann3@amd.com>
2 Date: Tue, 14 Oct 2008 19:01:15 +0000 (+0200)
3 Subject: x86: SB600: skip ACPI IRQ0 override if it is not routed to INT2 of IOAPIC
4 X-Git-Tag: v2.6.28-rc1~26^2~2^2
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=26adcfbf00e0726b4469070aa2f530dcf963f484
6
7 x86: SB600: skip ACPI IRQ0 override if it is not routed to INT2 of IOAPIC
8
9 On some more HP laptops BIOS reports an IRQ0 override
10 but the SB600 chipset is configured such that timer
11 interrupts go to INT0 of IOAPIC.
12
13 Check IRQ0 routing and if it is routed to INT0 of IOAPIC skip the
14 timer override.
15
16 http://bugzilla.kernel.org/show_bug.cgi?id=11715
17 http://bugzilla.kernel.org/show_bug.cgi?id=11516
18
19 Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
20 Signed-off-by: Len Brown <len.brown@intel.com>
21 [dsd@gentoo.org: rediff for 2.6.27]
22 ---
23
24 Index: linux-2.6.27-gentoo-r4/arch/x86/kernel/early-quirks.c
25 ===================================================================
26 --- linux-2.6.27-gentoo-r4.orig/arch/x86/kernel/early-quirks.c
27 +++ linux-2.6.27-gentoo-r4/arch/x86/kernel/early-quirks.c
28 @@ -95,7 +95,8 @@ static void __init nvidia_bugs(int num,
29
30 }
31
32 -static u32 ati_ixp4x0_rev(int num, int slot, int func)
33 +#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
34 +static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
35 {
36 u32 d;
37 u8 b;
38 @@ -115,7 +116,6 @@ static u32 ati_ixp4x0_rev(int num, int s
39
40 static void __init ati_bugs(int num, int slot, int func)
41 {
42 -#if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC)
43 u32 d;
44 u8 b;
45
46 @@ -138,9 +138,56 @@ static void __init ati_bugs(int num, int
47 printk(KERN_INFO "If you got timer trouble "
48 "try acpi_use_timer_override\n");
49 }
50 -#endif
51 }
52
53 +static u32 __init ati_sbx00_rev(int num, int slot, int func)
54 +{
55 + u32 old, d;
56 +
57 + d = read_pci_config(num, slot, func, 0x70);
58 + old = d;
59 + d &= ~(1<<8);
60 + write_pci_config(num, slot, func, 0x70, d);
61 + d = read_pci_config(num, slot, func, 0x8);
62 + d &= 0xff;
63 + write_pci_config(num, slot, func, 0x70, old);
64 +
65 + return d;
66 +}
67 +
68 +static void __init ati_bugs_contd(int num, int slot, int func)
69 +{
70 + u32 d, rev;
71 +
72 + if (acpi_use_timer_override)
73 + return;
74 +
75 + rev = ati_sbx00_rev(num, slot, func);
76 + if (rev > 0x13)
77 + return;
78 +
79 + /* check for IRQ0 interrupt swap */
80 + d = read_pci_config(num, slot, func, 0x64);
81 + if (!(d & (1<<14)))
82 + acpi_skip_timer_override = 1;
83 +
84 + if (acpi_skip_timer_override) {
85 + printk(KERN_INFO "SB600 revision 0x%x\n", rev);
86 + printk(KERN_INFO "Ignoring ACPI timer override.\n");
87 + printk(KERN_INFO "If you got timer trouble "
88 + "try acpi_use_timer_override\n");
89 + }
90 +}
91 +#else
92 +static void __init ati_bugs(int num, int slot, int func)
93 +{
94 +}
95 +
96 +static void __init ati_bugs_contd(int num, int slot, int func)
97 +{
98 +}
99 +#endif
100 +
101 #define QFLAG_APPLY_ONCE 0x1
102 #define QFLAG_APPLIED 0x2
103 #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
104 @@ -162,6 +209,8 @@ static struct chipset early_qrk[] __init
105 PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
106 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
107 PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
108 + { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
109 + PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
110 {}
111 };
112

  ViewVC Help
Powered by ViewVC 1.1.20