rpms/kernel/F-9 linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch, NONE, 1.1 kernel.spec, 1.845, 1.846

Chuck Ebbert cebbert at fedoraproject.org
Wed Nov 12 00:00:38 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18052

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch 
Log Message:
Check for more ATI timer routing bugs (#470587)

linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch:

--- NEW FILE linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch ---
From: Andreas Herrmann <andreas.herrmann3 at amd.com>
Date: Tue, 14 Oct 2008 19:01:15 +0000 (+0200)
Subject: x86: SB600: skip ACPI IRQ0 override if it is not routed to INT2 of IOAPIC
X-Git-Tag: v2.6.28-rc1~26^2~2^2
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=26adcfbf00e0726b4469070aa2f530dcf963f484

x86: SB600: skip ACPI IRQ0 override if it is not routed to INT2 of IOAPIC

On some more HP laptops BIOS reports an IRQ0 override
but the SB600 chipset is configured such that timer
interrupts go to INT0 of IOAPIC.

Check IRQ0 routing and if it is routed to INT0 of IOAPIC skip the
timer override.

http://bugzilla.kernel.org/show_bug.cgi?id=11715
http://bugzilla.kernel.org/show_bug.cgi?id=11516

Signed-off-by: Andreas Herrmann <andreas.herrmann3 at amd.com>
Signed-off-by: Len Brown <len.brown at intel.com>
---

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 733c4f8..3ce029f 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -95,7 +95,8 @@ static void __init nvidia_bugs(int num, int slot, int func)
 
 }
 
-static u32 ati_ixp4x0_rev(int num, int slot, int func)
+#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
+static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
 {
 	u32 d;
 	u8  b;
@@ -115,7 +116,6 @@ static u32 ati_ixp4x0_rev(int num, int slot, int func)
 
 static void __init ati_bugs(int num, int slot, int func)
 {
-#if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC)
 	u32 d;
 	u8  b;
 
@@ -138,9 +138,56 @@ static void __init ati_bugs(int num, int slot, int func)
 		printk(KERN_INFO "If you got timer trouble "
 		       "try acpi_use_timer_override\n");
 	}
-#endif
 }
 
+static u32 __init ati_sbx00_rev(int num, int slot, int func)
+{
+	u32 old, d;
+
+	d = read_pci_config(num, slot, func, 0x70);
+	old = d;
+	d &= ~(1<<8);
+	write_pci_config(num, slot, func, 0x70, d);
+	d = read_pci_config(num, slot, func, 0x8);
+	d &= 0xff;
+	write_pci_config(num, slot, func, 0x70, old);
+
+	return d;
+}
+
+static void __init ati_bugs_contd(int num, int slot, int func)
+{
+	u32 d, rev;
+
+	if (acpi_use_timer_override)
+		return;
+
+	rev = ati_sbx00_rev(num, slot, func);
+	if (rev > 0x13)
+		return;
+
+	/* check for IRQ0 interrupt swap */
+	d = read_pci_config(num, slot, func, 0x64);
+	if (!(d & (1<<14)))
+		acpi_skip_timer_override = 1;
+
+	if (acpi_skip_timer_override) {
+		printk(KERN_INFO "SB600 revision 0x%x\n", rev);
+		printk(KERN_INFO "Ignoring ACPI timer override.\n");
+		printk(KERN_INFO "If you got timer trouble "
+		       "try acpi_use_timer_override\n");
+	}
+}
+#else
+static void __init ati_bugs(int num, int slot, int func)
+{
+}
+
+static void __init ati_bugs_contd(int num, int slot, int func)
+{
+}
+#endif
+
 #define QFLAG_APPLY_ONCE 	0x1
 #define QFLAG_APPLIED		0x2
 #define QFLAG_DONE		(QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -162,6 +209,8 @@ static struct chipset early_qrk[] __initdata = {
 	  PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
 	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
+	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
 	{}
 };
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.845
retrieving revision 1.846
diff -u -r1.845 -r1.846
--- kernel.spec	9 Nov 2008 22:29:17 -0000	1.845
+++ kernel.spec	12 Nov 2008 00:00:07 -0000	1.846
@@ -607,6 +607,7 @@
 Patch70: linux-2.6-x86-tune-generic.patch
 Patch75: linux-2.6-x86-debug-boot.patch
 Patch101: linux-2.6-x86-check-for-null-irq-context.patch
+Patch102: linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch
 
 # ppc
 Patch140: linux-2.6-ps3-ehci-iso.patch
@@ -1088,7 +1089,8 @@
 ApplyPatch linux-2.6-x86-tune-generic.patch
 # don't oops if there's no IRQ stack available
 ApplyPatch linux-2.6-x86-check-for-null-irq-context.patch
-# don't try to read memory beyond end-of-stack
+# check for more ATI timer bugs
+ApplyPatch linux-2.6-x86-sb600-skip-acpi-irq0-override-if-not-routed-to-int2.patch
 
 #
 # PowerPC
@@ -1885,6 +1887,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Sun Nov 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.5-33
+- Check for more ATI timer routing bugs (#470587)
+
 * Sun Nov 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.5-32
 - Fix up the CVE-2008-3528 patch so we get it from -stable.
 




More information about the scm-commits mailing list