pci_bridge: Use a default map_irq function

The PCI bridge spec defines a default swizzle for translating INTx
IRQs from secondary bus to primary.  Use this by default for any
bridge that doesn't set a function.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Alex Williamson 2013-03-07 16:16:54 -07:00 committed by Michael S. Tsirkin
parent e5368f0da7
commit 659fefeed3

View File

@ -366,7 +366,7 @@ int pci_bridge_initfn(PCIDevice *dev)
qbus_create_inplace(&sec_bus->qbus, TYPE_PCI_BUS, &dev->qdev,
br->bus_name);
sec_bus->parent_dev = dev;
sec_bus->map_irq = br->map_irq;
sec_bus->map_irq = br->map_irq ? br->map_irq : pci_swizzle_map_irq_fn;
sec_bus->address_space_mem = &br->address_space_mem;
memory_region_init(&br->address_space_mem, "pci_bridge_pci", INT64_MAX);
sec_bus->address_space_io = &br->address_space_io;