aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorBALATON Zoltan via <qemu-ppc@nongnu.org>2021-01-03 02:09:33 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2021-01-06 11:09:59 +1100
commit2a9cf49598c65d117b53f72d895ac3c20a3027bc (patch)
tree0c441dd2affe7369e814e8ee2642676742446da4 /hw/ppc
parent038da2adf0262b17ff4bf373178ca018bd817721 (diff)
downloadqemu-2a9cf49598c65d117b53f72d895ac3c20a3027bc.zip
qemu-2a9cf49598c65d117b53f72d895ac3c20a3027bc.tar.gz
qemu-2a9cf49598c65d117b53f72d895ac3c20a3027bc.tar.bz2
ppc440_pcix: Improve comment for IRQ mapping
The code mapping all PCI interrupts to a single CPU IRQ works but is not trivial so document it in a comment. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <c25c0310510672b58466e795fd701e65e8f1ff97.1609636173.git.balaton@eik.bme.hu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/ppc440_pcix.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
index ee95231..eb1290f 100644
--- a/hw/ppc/ppc440_pcix.c
+++ b/hw/ppc/ppc440_pcix.c
@@ -415,8 +415,15 @@ static void ppc440_pcix_reset(DeviceState *dev)
s->sts = 0;
}
-/* All pins from each slot are tied to a single board IRQ.
- * This may need further refactoring for other boards. */
+/*
+ * All four IRQ[ABCD] pins from all slots are tied to a single board
+ * IRQ, so our mapping function here maps everything to IRQ 0.
+ * The code in pci_change_irq_level() tracks the number of times
+ * the mapped IRQ is asserted and deasserted, so if multiple devices
+ * assert an IRQ at the same time the behaviour is correct.
+ *
+ * This may need further refactoring for boards that use multiple IRQ lines.
+ */
static int ppc440_pcix_map_irq(PCIDevice *pci_dev, int irq_num)
{
trace_ppc440_pcix_map_irq(pci_dev->devfn, irq_num, 0);