From: Matthew Garrett <mjg59@srcf.ucam.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Disable APIC pin 1 on dodgy ATI chipsets
Date: Thu, 24 Nov 2005 05:44:31 +0000 [thread overview]
Message-ID: <20051124054430.GC28070@srcf.ucam.org> (raw)
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@srcf.ucam.og>
--- 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@srcf.ucam.org
reply other threads:[~2005-11-24 5:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051124054430.GC28070@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.