[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/16] hw/pci-host/mv64361: Reuse pci_swizzle_map_irq_fn
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 04/16] hw/pci-host/mv64361: Reuse pci_swizzle_map_irq_fn |
Date: |
Sun, 5 Feb 2023 07:04:37 -0300 |
From: Bernhard Beschow <shentey@gmail.com>
mv64361_pcihost_map_irq() is a reimplementation of
pci_swizzle_map_irq_fn(). Resolve this redundancy.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20230106113927.8603-1-shentey@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/pci-host/mv64361.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c
index 015b92bd5f..f43f33fbd9 100644
--- a/hw/pci-host/mv64361.c
+++ b/hw/pci-host/mv64361.c
@@ -72,11 +72,6 @@ struct MV64361PCIState {
uint64_t remap[5];
};
-static int mv64361_pcihost_map_irq(PCIDevice *pci_dev, int n)
-{
- return (n + PCI_SLOT(pci_dev->devfn)) % PCI_NUM_PINS;
-}
-
static void mv64361_pcihost_set_irq(void *opaque, int n, int level)
{
MV64361PCIState *s = opaque;
@@ -97,7 +92,7 @@ static void mv64361_pcihost_realize(DeviceState *dev, Error
**errp)
g_free(name);
name = g_strdup_printf("pci.%d", s->index);
h->bus = pci_register_root_bus(dev, name, mv64361_pcihost_set_irq,
- mv64361_pcihost_map_irq, dev,
+ pci_swizzle_map_irq_fn, dev,
&s->mem, &s->io, 0, 4, TYPE_PCI_BUS);
g_free(name);
pci_create_simple(h->bus, 0, TYPE_MV64361_PCI_BRIDGE);
--
2.39.1
- [PULL 00/16] ppc queue, Daniel Henrique Barboza, 2023/02/05
- [PULL 04/16] hw/pci-host/mv64361: Reuse pci_swizzle_map_irq_fn,
Daniel Henrique Barboza <=
- [PULL 03/16] ppc/pegasos2: Improve readability of VIA south bridge creation, Daniel Henrique Barboza, 2023/02/05
- [PULL 01/16] tests/migration: add sysprof-capture-4 as dependency for stress binary, Daniel Henrique Barboza, 2023/02/05
- [PULL 06/16] hw/ppc/e500{, plat}: Drop redundant checks for presence of platform bus, Daniel Henrique Barboza, 2023/02/05
- [PULL 07/16] hw/ppc/e500.c: Avoid hardcoding parent device in create_devtree_etsec(), Daniel Henrique Barboza, 2023/02/05
- [PULL 05/16] hw/ppc: Set machine->fdt in e500 machines, Daniel Henrique Barboza, 2023/02/05
- [PULL 02/16] tests/migration: add support for ppc64le for guestperf.py, Daniel Henrique Barboza, 2023/02/05
- [PULL 08/16] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space, Daniel Henrique Barboza, 2023/02/05
- [PULL 10/16] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID, Daniel Henrique Barboza, 2023/02/05
- [PULL 11/16] ppc/pnv/pci: Update PHB5 version register, Daniel Henrique Barboza, 2023/02/05
- [PULL 09/16] ppc/pnv/pci: Cleanup PnvPHBPecState structure, Daniel Henrique Barboza, 2023/02/05