linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH 2.4.5.1: Fix Via interrupt routing issues
@ 2001-05-13 17:28 Jeff Garzik
  2001-05-13 18:38 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jeff Garzik @ 2001-05-13 17:28 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: arjanv, Alan Cox, Axel Thimm, Manuel A. McLure,
	 Rasmus Bøg Hansen, ARND BERGMANN, Dunlap, Randy,
	Martin Diehl, Adrian Cox, Capricelli Thomas, Ian Bicking,
	John R Lenton

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

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!

-- 
Jeff Garzik      | Game called on account of naked chick
Building 1024    |
MandrakeSoft     |

[-- Attachment #2: via-apic.patch --]
[-- Type: text/plain, Size: 1869 bytes --]

Index: drivers/pci/quirks.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/pci/quirks.c,v
retrieving revision 1.1.1.35
diff -u -r1.1.1.35 quirks.c
--- drivers/pci/quirks.c	2001/05/02 09:26:23	1.1.1.35
+++ drivers/pci/quirks.c	2001/05/13 17:22:18
@@ -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 }
 };
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-13 17:28 PATCH 2.4.5.1: Fix Via interrupt routing issues Jeff Garzik
@ 2001-05-13 18:38 ` Alan Cox
  2001-05-13 18:45   ` Jeff Garzik
  2001-05-14 15:21 ` Axel Thimm
  2001-05-14 17:07 ` John R Lenton
  2 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2001-05-13 18:38 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Linux Kernel Mailing List, arjanv, Alan Cox, Axel Thimm,
	Manuel A. McLure,  Rasmus Bøg Hansen, ARND BERGMANN,
	Dunlap Randy, Martin Diehl, Adrian Cox, Capricelli Thomas,
	Ian Bicking, John R Lenton

> +/* 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-13 18:38 ` Alan Cox
@ 2001-05-13 18:45   ` Jeff Garzik
  2001-05-13 18:47     ` Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2001-05-13 18:45 UTC (permalink / raw)
  To: Alan Cox
  Cc: Linux Kernel Mailing List, arjanv, Axel Thimm, Manuel A. McLure,
	Rasmus Bøg Hansen, ARND BERGMANN, Dunlap Randy,
	Martin Diehl, Adrian Cox, Capricelli Thomas, Ian Bicking,
	John R Lenton

Alan Cox wrote:
> 
> > +/* 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?

>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"

-- 
Jeff Garzik      | Game called on account of naked chick
Building 1024    |
MandrakeSoft     |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-13 18:45   ` Jeff Garzik
@ 2001-05-13 18:47     ` Alan Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2001-05-13 18:47 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Alan Cox, Linux Kernel Mailing List, arjanv, Axel Thimm,
	Manuel A. McLure, Rasmus Bøg Hansen, ARND BERGMANN,
	Dunlap Randy, Martin Diehl, Adrian Cox, Capricelli Thomas,
	Ian Bicking, John R Lenton

> > 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

> >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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-13 17:28 PATCH 2.4.5.1: Fix Via interrupt routing issues Jeff Garzik
  2001-05-13 18:38 ` Alan Cox
@ 2001-05-14 15:21 ` Axel Thimm
  2001-05-14 16:16   ` Jeff Garzik
  2001-05-14 17:07 ` John R Lenton
  2 siblings, 1 reply; 9+ messages in thread
From: Axel Thimm @ 2001-05-14 15:21 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Linux Kernel Mailing List, arjanv, Alan Cox, Manuel A. McLure,
	Rasmus Bøg Hansen, ARND BERGMANN, Dunlap, Randy,
	Martin Diehl, Adrian Cox, Capricelli Thomas, Ian Bicking,
	John R Lenton, Jens Dreger, David Hansen

On Sun, May 13, 2001 at 01:28:06PM -0400, Jeff Garzik wrote:
> 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?
-- 
Axel.Thimm@physik.fu-berlin.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-14 15:21 ` Axel Thimm
@ 2001-05-14 16:16   ` Jeff Garzik
  2001-05-14 19:05     ` Axel Thimm
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2001-05-14 16:16 UTC (permalink / raw)
  To: Axel Thimm
  Cc: Linux Kernel Mailing List, arjanv, Alan Cox, Manuel A. McLure,
	Rasmus Bøg Hansen, ARND BERGMANN, Dunlap, Randy,
	Martin Diehl, Adrian Cox, Capricelli Thomas, Ian Bicking,
	John R Lenton, Jens Dreger, David Hansen

Axel Thimm wrote:
> 
> On Sun, May 13, 2001 at 01:28:06PM -0400, Jeff Garzik wrote:
> > 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?

Not for MP only, but mostly such:  UP systems with IO-APIC, or MP
systems.

-- 
Jeff Garzik      | Game called on account of naked chick
Building 1024    |
MandrakeSoft     |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-13 17:28 PATCH 2.4.5.1: Fix Via interrupt routing issues Jeff Garzik
  2001-05-13 18:38 ` Alan Cox
  2001-05-14 15:21 ` Axel Thimm
@ 2001-05-14 17:07 ` John R Lenton
  2 siblings, 0 replies; 9+ messages in thread
From: John R Lenton @ 2001-05-14 17:07 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Linux Kernel Mailing List, arjanv, Alan Cox, Axel Thimm,
	Manuel A. McLure, Rasmus Bøg Hansen, ARND BERGMANN, Dunlap,
	Randy, Martin Diehl, Adrian Cox, Capricelli Thomas, Ian Bicking

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

On Sun, May 13, 2001 at 01:28:06PM -0400, Jeff Garzik wrote:
> 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.

-- 
John Lenton (john@grulic.org.ar) -- Random fortune:
Las palabras, cera; las obras acero.
        -- Luis de Argote y Góngora. (1561-1627) Poeta español. 

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-14 16:16   ` Jeff Garzik
@ 2001-05-14 19:05     ` Axel Thimm
  2001-05-14 19:14       ` Axel Thimm
  0 siblings, 1 reply; 9+ messages in thread
From: Axel Thimm @ 2001-05-14 19:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel Mailing List

[Cc: list trimmed]

On Mon, May 14, 2001 at 12:16:55PM -0400, Jeff Garzik wrote:
> Axel Thimm wrote:
> > On Sun, May 13, 2001 at 01:28:06PM -0400, Jeff Garzik wrote:
> > > 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?
> 
> Not for MP only, but mostly such:  UP systems with IO-APIC, or MP
> systems.

What about the following dmesg logs:

> 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.
-- 
Axel.Thimm@physik.fu-berlin.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: PATCH 2.4.5.1: Fix Via interrupt routing issues
  2001-05-14 19:05     ` Axel Thimm
@ 2001-05-14 19:14       ` Axel Thimm
  0 siblings, 0 replies; 9+ messages in thread
From: Axel Thimm @ 2001-05-14 19:14 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

On Mon, May 14, 2001 at 09:05:56PM +0200, Axel Thimm wrote:
> 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.
-- 
Axel.Thimm@physik.fu-berlin.de

[-- Attachment #2: dmesg-2.4.4-ac5.log.bz2 --]
[-- Type: application/x-bzip2, Size: 3874 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-05-15  1:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-13 17:28 PATCH 2.4.5.1: Fix Via interrupt routing issues Jeff Garzik
2001-05-13 18:38 ` Alan Cox
2001-05-13 18:45   ` Jeff Garzik
2001-05-13 18:47     ` Alan Cox
2001-05-14 15:21 ` Axel Thimm
2001-05-14 16:16   ` Jeff Garzik
2001-05-14 19:05     ` Axel Thimm
2001-05-14 19:14       ` Axel Thimm
2001-05-14 17:07 ` John R Lenton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).