Subject: Re: pci_intr_map: no MP mapping found
To: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-smp
Date: 05/04/2002 15:59:49
> There are currently some problems with MP interrupt mapping in the
> presence of multiple pci busses.  it's on my list..

This is my workaround, fwiw:
(fixing the mi PCI code would be better...)

Index: pci/pci_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/pci/pci_machdep.c,v
retrieving revision 1.35.2.11
diff -u -r1.35.2.11 pci_machdep.c
--- pci/pci_machdep.c	2002/04/27 20:24:49	1.35.2.11
+++ pci/pci_machdep.c	2002/05/04 14:12:52
@@ -532,7 +532,9 @@
 		 * the numbers given by the MP bios.
 		 * XXX Is this a valid assumption?
 		 */
-		int mpspec_pin = (dev<<2)|(pin-1);
+		int realpin = PCI_INTERRUPT_PIN(pci_conf_read(pa->pa_pc,
+				  pa->pa_tag, PCI_INTERRUPT_REG));
+		int mpspec_pin = (dev<<2)|(realpin - 1);
 		
 		
 		for (mip = mp_busses[bus].mb_intrs; mip != NULL; mip=mip->next) {
@@ -543,7 +545,7 @@
 		}
 		if (mip == NULL) {
 			printf("pci_intr_map: bus %d dev %d func %d pin %d; line %d\n",
-			    bus, dev, func, pin, line);
+			    bus, dev, func, realpin, line);
 			
 			printf("pci_intr_map: no MP mapping found\n");
 		}