[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] hw/pci-host/prep: Fix PCI swizzling in map_irq()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/4] hw/pci-host/prep: Fix PCI swizzling in map_irq() |
Date: |
Mon, 12 Oct 2020 09:19:05 +0200 |
In commit a01d8cadadf we changed the number of IRQs to 4 but
forgot to update the map_irq() function. Do it now.
Fixes: a01d8cadadf ("Fix memory corruption ... in PreP emulation")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Jocelyn Mayer <l_indien@magic.fr>
Cc: Julian Seward <julian@valgrind.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/prep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 064593d1e52..2224135fedb 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -195,7 +195,7 @@ static const MemoryRegionOps raven_io_ops = {
static int raven_map_irq(PCIDevice *pci_dev, int irq_num)
{
- return (irq_num + (pci_dev->devfn >> 3)) & 1;
+ return (irq_num + (pci_dev->devfn >> 3)) & 3;
}
static void raven_set_irq(void *opaque, int irq_num, int level)
--
2.26.2