PATCH 2.4.5.1: Fix Via interrupt routing issues
For those of you with Via interrupting routing issues (or interrupt-not-being-delivered issues, etc), please try out this patch and let me know if it fixes things. It originates from a tip from Adrian Cox... thanks Adrian!
Signature · 3 lines
Jeff Garzik | Game called on account of naked chick Building 1024 | MandrakeSoft |
Index: drivers/pci/quirks.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/pci/quirks.c,v retrieving revision 1.1.1.35
pci/quirks.c +36 -0
@@ -12,6 +12,7 @@* use the PowerTweak utility (see http://powertweak.sourceforge.net). */ +#include <linux/config.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/pci.h>
@@ -238,7 +239,34 @@quirk_io_region (dev, smb,16 ,PCI_BRIDGE_RESOURCES +2 ); } + +/* we will likely need a better ifdef, something like +* ifdef CONFIG_EXTERNAL_APIC +*/ +#ifdef CONFIG_X86_IO_APIC +extern int nr_ioapics; +/* +* VIA 686A/B: If an IO-APIC is active, we need to route all on-chip +* devices to the external APIC. +*/ +static void __init quirk_via_ioapic (struct pci_dev *dev) +{ +u8 tmp; + +if (nr_ioapics <1 ) + tmp =0 ;/* nothing routed to external APIC */ +else + tmp =0x1f ;/* all known bits (4-0) routed to external APIC */ + +/* Offset 0x58: External APIC IRQ output control */ +pci_write_config_byte (dev,0x58 , tmp); +} + +#endif /* CONFIG_X86_IO_APIC */ + + +/* * PIIX3 USB: We have to disable USB interrupts that are * hardwired to PIRQD# and may be shared with an * external device.
@@ -322,6 +350,14 @@ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_2, quirk_piix3_usb }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, quirk_piix3_usb }, { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy }, + +/* we will likely need a better ifdef, something like +* ifdef CONFIG_EXTERNAL_APIC +*/ +#ifdef CONFIG_X86_IO_APIC + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic }, +#endif + { 0 } };
pci/quirks.c line 246
Quoted 4 lines
pci/quirks.c +4
-0+/* we will likely need a better ifdef, something like +* ifdef CONFIG_EXTERNAL_APIC +*/ +#ifdef CONFIG_X86_IO_APIC
I disagree. The IO-APIC is the chipset APIC. It is distinct from the APIC on the processors.
Quoted 8 lines · Alan Cox
pci/quirks.c line 246
Quoted 5 lines
pci/quirks.c +4
-0+/* we will likely need a better ifdef, something like +* ifdef CONFIG_EXTERNAL_APIC +*/ +#ifdef CONFIG_X86_IO_APIC I disagree. The IO-APIC is the chipset APIC. It is distinct from the APIC on the processors.
Disagree with which part? The fix, or likely needing a better ifdef?
Quoted 1 line
From the point of view of the Via southbridge chip, IO-APIC is
external... The comment above the ifdef was more along the lines of, "Via on PPC (OpenPIC?) might need this too, not just io-apic"
Signature · 3 lines
Jeff Garzik | Game called on account of naked chick Building 1024 | MandrakeSoft |
Quoted 4 lines
Quoted 2 lines
I disagree. The IO-APIC is the chipset APIC. It is distinct from the APIC on the processors.
Disagree with which part? The fix, or likely needing a better ifdef?
Needing a better ifdef
Quoted 3 lines
Quoted 1 line
From the point of view of the Via southbridge chip, IO-APIC is
external... The comment above the ifdef was more along the lines of, "Via on PPC (OpenPIC?) might need this too, not just io-apic"
That will be an architecture specific quirk. I don't actually think you can better. Somehow I always assumed ppc people had better taste in bridges 8)
Quoted 4 lines · Jeff Garzik
For those of you with Via interrupting routing issues (or interrupt-not-being-delivered issues, etc), please try out this patch and let me know if it fixes things. It originates from a tip from Adrian Cox... thanks Adrian!
Unfortunately the patch does not trigger here. nr_ioapics is zero on my UP KT133A board. Was this patch for MP only?
Signature · 1 line
[email protected]
Quoted 9 lines · Axel Thimm
Quoted 4 lines · Jeff Garzik
For those of you with Via interrupting routing issues (or interrupt-not-being-delivered issues, etc), please try out this patch and let me know if it fixes things. It originates from a tip from Adrian Cox... thanks Adrian!
Unfortunately the patch does not trigger here.
nr_ioapicsis zero on my UP KT133A board. Was this patch for MP only?
Not for MP only, but mostly such: UP systems with IO-APIC, or MP systems.
Signature · 3 lines
Jeff Garzik | Game called on account of naked chick Building 1024 | MandrakeSoft |
[Cc: list trimmed]
Quoted 7 lines · Jeff Garzik
Quoted 6 lines · Axel Thimm
Quoted 4 lines · Jeff Garzik
For those of you with Via interrupting routing issues (or interrupt-not-being-delivered issues, etc), please try out this patch and let me know if it fixes things. It originates from a tip from Adrian Cox... thanks Adrian!
Quoted 5 lines
Quoted 2 lines
Unfortunately the patch does not trigger here.
nr_ioapicsis zero on my UP KT133A board. Was this patch for MP only?Not for MP only, but mostly such: UP systems with IO-APIC, or MP systems.
What about the following dmesg logs:
Quoted 5 lines
Local APIC disabled by BIOS -- reenabling.
Found and enabled local APIC!
[...]
Using local APIC timer interrupts.
calibrating APIC timer ...
Don't they imply an APIC?
Anyway, I am sending the dmesg with "#define DEBUG 1" in pci-i386.h. It is a 2.4.4-ac5 defconfig kernel, but 2.4.4 has the same errors. System is an MS-6330 v3.0 (MSI K7T Turbo), KT133A, Duron 700. I you have any idea, how I could fix the pirq table I'd be glad to test further.
Regards, Axel.
Signature · 1 line
[email protected]
Quoted 4 lines · Axel Thimm
Anyway, I am sending the dmesg with "#define DEBUG 1" in
pci-i386.h. It is a 2.4.4-ac5 defconfig kernel, but 2.4.4 has the same errors. System is an MS-6330 v3.0 (MSI K7T Turbo), KT133A, Duron 700. I you have any idea, how I could fix the pirq table I'd be glad to test further.
Perhaps I should have also sent it ...
Here it comes.
Signature · 1 line
[email protected]
Quoted 4 lines · Jeff Garzik
For those of you with Via interrupting routing issues (or interrupt-not-being-delivered issues, etc), please try out this patch and let me know if it fixes things. It originates from a tip from Adrian Cox... thanks Adrian!
Just to add a little noise: My box (msi 694d pro AI motherboard, revI, i.e. vt82c686a) been a *lot* stabler since I removed the Live! and dropped back to the onboard soundcard.
The only time it has frozen has been when checking to see if this also fixed the X-freezes-on-reentry thing (which I know was silly, since CVS X has had that fixed for some time and the fix is on the slow path to 4.1).
I used to get a freeze (that is a lock-up where I have to reset the box, unable to even alt-sysrq my way out) between one and five times per day, nearly always in X, nearly always with sound, nearly always using up a lot of (memtested) memory.
'nearly always' means 'at least once not' -- scientific as hell.
If I could put in words the difference between the Live! and the via, I would. Alas, I can't, so you're stuck with this inane rant:
please please please fix it.
Signature · 3 lines
John Lenton ([email protected]) -- Random fortune: Las palabras, cera; las obras acero. -- Luis de Argote y Góngora. (1561-1627) Poeta español.