[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 06/11] ppc: Make uninorth interrupt swizzling identical
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 06/11] ppc: Make uninorth interrupt swizzling identical to Grackle |
Date: |
Wed, 23 Nov 2016 13:49:38 +1100 |
From: Benjamin Herrenschmidt <address@hidden>
It's currently broken as it uses an incorrect shift, it tries
to use the slot number but uses the top bits of the bus number
instead.
Note: Neither implementation matches what OpenBIOS ends up putting
in the device-tree either, which will have to be fixed separately.
This is not quite correct for modelling a real Mac since Apple
tend to tie all 4 interrupt lines of a slot together and have
separate interrupts for every slot and every motherboard devices
going straight to the PIC but we'll sort that out later.
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/pci-host/uninorth.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 7aac4d6..df342ac 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)
--
2.7.4
- [Qemu-ppc] [PULL 03/11] ppc: BOOK3E: nothing should be done when MSR:PR is set, (continued)
- [Qemu-ppc] [PULL 03/11] ppc: BOOK3E: nothing should be done when MSR:PR is set, David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 04/11] hw/char/spapr_vty: Return amount of free buffer entries in vty_can_receive(), David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 02/11] spapr: migration support for CAS-negotiated option vectors, David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 11/11] spapr: Fix 2.7<->2.8 migration of PCI host bridge, David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 07/11] target-ppc: Fix CPU migration from qemu-2.6 <-> later versions, David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 09/11] target-ppc: Allow eventual removal of old migration mistakes, David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 10/11] Revert "spapr: Fix migration of PCI host bridges from qemu-2.7", David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 08/11] migration: Add VMSTATE_UINTTL_TEST(), David Gibson, 2016/11/22
- [Qemu-ppc] [PULL 06/11] ppc: Make uninorth interrupt swizzling identical to Grackle,
David Gibson <=
- [Qemu-ppc] [PULL 05/11] target-ppc: fix index array of national digits, David Gibson, 2016/11/22
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/11] ppc-for-2.8 queue 20161123, no-reply, 2016/11/22
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/11] ppc-for-2.8 queue 20161123, Stefan Hajnoczi, 2016/11/23