[OpenBIOS] [PATCH 4/4] ppc: Fix PCI interrupt routing to match what qemu does

BALATON Zoltan balaton at eik.bme.hu
Sun Nov 20 20:45:45 CET 2016


From: Benjamin Herrenschmidt <benh at kernel.crashing.org>

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 drivers/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This should be commited after this change in QEMU:
http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg03740.html

diff --git a/drivers/pci.c b/drivers/pci.c
index 7ad5202..c998280 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -1565,7 +1565,7 @@ static void ob_pci_host_set_interrupt_map(phandle_t host)
                         ncells += pci_encode_phys_addr(props + ncells, 0, 0, addr, 0, 0);
                         props[ncells++] = intno;
                         props[ncells++] = dnode;
-                        props[ncells++] = arch->irqs[intno - 1];
+                        props[ncells++] = arch->irqs[((intno - 1) + (addr >> 11)) & 3];
                         props[ncells++] = 1;
 #else
                         /* Keep compiler quiet */
-- 
2.7.4




More information about the OpenBIOS mailing list