mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
c413605ba6
commit
e8ec4adfe2
3 changed files with 9 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/***********************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue