diff options
author | Greg Kurz <groug@kaod.org> | 2019-04-05 18:30:48 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-04-26 11:37:57 +1000 |
commit | e8ec4adfe2de8603e271e38b0d50d7d453c0c21b (patch) | |
tree | 00c0589c268493c8da2e6523872497319e424ce7 /hw/pci | |
parent | c413605ba6bfe9ae9f27d316f573df562d70830a (diff) |
spapr: Drop duplicate PCI swizzle code
LSI mapping in spapr currently open-codes standard PCI swizzling. It thus
duplicates the code of pci_swizzle_map_irq_fn().
Expose the swizzling formula so that it can be used with a slot number
when building the device tree. Simply drop pci_spapr_map_irq() and call
pci_swizzle_map_irq_fn() instead.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155448184841.8446.13959787238854054119.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/pci')
-rw-r--r-- | hw/pci/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 1808b242dd..a78023f669 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1556,7 +1556,7 @@ void pci_device_set_intx_routing_notifier(PCIDevice *dev, */ int pci_swizzle_map_irq_fn(PCIDevice *pci_dev, int pin) { - return (pin + PCI_SLOT(pci_dev->devfn)) % PCI_NUM_PINS; + return pci_swizzle(PCI_SLOT(pci_dev->devfn), pin); } /***********************************************************/ |