aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/pci_bridge.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-03-07 16:16:54 -0700
committerMichael S. Tsirkin <mst@redhat.com>2013-03-26 21:02:17 +0200
commit659fefeed36a4b58191595cebab2dbc003788d90 (patch)
tree48164f51e5d4de783592004e6e4e249e285781ee /hw/pci/pci_bridge.c
parente5368f0da75c1c668e85398aa930be2f4273e684 (diff)
downloadqemu-659fefeed36a4b58191595cebab2dbc003788d90.zip
qemu-659fefeed36a4b58191595cebab2dbc003788d90.tar.gz
qemu-659fefeed36a4b58191595cebab2dbc003788d90.tar.bz2
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>
Diffstat (limited to 'hw/pci/pci_bridge.c')
-rw-r--r--hw/pci/pci_bridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index edb8c8d..bf93ac6 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -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;