aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pci-host/apb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
index ccd38d0a53..e0996556e5 100644
--- a/hw/pci-host/apb.c
+++ b/hw/pci-host/apb.c
@@ -365,7 +365,7 @@ static int pci_pbm_map_irq(PCIDevice *pci_dev, int irq_num)
bus_offset = 16;
else
bus_offset = 0;
- return bus_offset + irq_num;
+ return (bus_offset + (PCI_SLOT(pci_dev->devfn) << 2) + irq_num) & 0x1f;
}
static void pci_apb_set_irq(void *opaque, int irq_num, int level)