[PATCH] Disable APIC pin 1 on dodgy ATI chipsets
From: Matthew Garrett
Date: Thu Nov 24 2005 - 00:44:04 EST
ATI's AMD64 chipsets appear to have the interesting "feature" that every
timer tick causes an interrupt from both the APIC and the legacy PIC.
The following patch checks if the northbridge matches the affected
chipsets, and if so disables APIC pin 1. As an added bonus, it skips the
acpi timer override since I haven't found one of these machines where
it's needed and it's actively harmful on at least some of them. We've
been shipping this patch in Ubuntu with no reported issues.
This is kernel bugzilla number 3927.
Signed-off-by: Matthew Garrett <mjg59@xxxxxxxxxxxx>
--- io_apic.c.orig 2005-09-20 21:43:42.000000000 +0100
+++ a/arch/x86_64/kernel/io_apic.c 2005-09-20 22:33:42.000000000 +0100
@@ -45,6 +45,7 @@
int sis_apic_bug; /* not actually supported, dummy for compile */
static int no_timer_check;
+static int disable_timer_pin_1;
static DEFINE_SPINLOCK(ioapic_lock);
@@ -258,18 +259,24 @@ void __init check_ioapic(void)
for (func = 0; func < 8; func++) {
u32 class;
u32 vendor;
+ u16 product;
u8 type;
class = read_pci_config(num,slot,func,
PCI_CLASS_REVISION);
+
if (class == 0xffffffff)
break;
- if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
+ if ((class >> 16) != PCI_CLASS_BRIDGE_PCI &&
+ (class >> 16) != PCI_CLASS_BRIDGE_HOST)
continue;
vendor = read_pci_config(num, slot, func,
PCI_VENDOR_ID);
vendor &= 0xffff;
+
+ product = read_pci_config_16(num, slot, func,
+ PCI_DEVICE_ID);
switch (vendor) {
case PCI_VENDOR_ID_VIA:
#ifdef CONFIG_GART_IOMMU
@@ -292,8 +299,18 @@ void __init check_ioapic(void)
#endif
/* RED-PEN skip them on mptables too? */
return;
- }
+ case PCI_VENDOR_ID_ATI:
+ if (product==0x5950 || product==0x5951) {
+ printk(KERN_INFO "ATI board detected - disabling APIC pin 1\n");
+#ifdef CONFIG_ACPI
+ /* This seems to be wrong, too */
+ acpi_skip_timer_override = 1;
+#endif
+ disable_timer_pin_1 = 1;
+ }
+ return;
+ }
/* No multi-function device? */
type = read_pci_config_byte(num,slot,func,
PCI_HEADER_TYPE);
--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/