aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host/uninorth.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci-host/uninorth.c')
-rw-r--r--hw/pci-host/uninorth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 7aac4d67a4..df342ac3cb 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -62,9 +62,7 @@ typedef struct UNINState {
static int pci_unin_map_irq(PCIDevice *pci_dev, int irq_num)
{
- int devfn = pci_dev->devfn & 0x00FFFFFF;
-
- return (((devfn >> 11) & 0x1F) + irq_num) & 3;
+ return (irq_num + (pci_dev->devfn >> 3)) & 3;
}
static void pci_unin_set_irq(void *opaque, int irq_num, int level)