summaryrefslogtreecommitdiffstats
path: root/hw/pci
diff options
context:
space:
mode:
authorMarcel Apfelbaum2013-10-07 09:36:40 +0200
committerMichael S. Tsirkin2013-10-14 16:11:45 +0200
commit5a03e708f213c716c9dde11e8ab4b23b8ca5c066 (patch)
tree0ffce44d049bd8ba1dcd05f6cf06b6e49d3e9c61 /hw/pci
parenthw: set interrupts using pci irq wrappers (diff)
downloadqemu-5a03e708f213c716c9dde11e8ab4b23b8ca5c066.tar.gz
qemu-5a03e708f213c716c9dde11e8ab4b23b8ca5c066.tar.xz
qemu-5a03e708f213c716c9dde11e8ab4b23b8ca5c066.zip
hw/pcie: AER and hot-plug events must use device's interrupt
The fields hpev_intx and aer_intx were removed because both AER and hot-plug events must use device's interrupt. Assert/deassert interrupts using pci irq wrappers instead. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pcie.c4
-rw-r--r--hw/pci/pcie_aer.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 50af3c1dfe..268a696646 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -187,7 +187,7 @@ static void hotplug_event_notify(PCIDevice *dev)
} else if (msi_enabled(dev)) {
msi_notify(dev, pcie_cap_flags_get_vector(dev));
} else {
- qemu_set_irq(dev->irq[dev->exp.hpev_intx], dev->exp.hpev_notified);
+ pci_set_irq(dev, dev->exp.hpev_notified);
}
}
@@ -195,7 +195,7 @@ static void hotplug_event_clear(PCIDevice *dev)
{
hotplug_event_update_event_status(dev);
if (!msix_enabled(dev) && !msi_enabled(dev) && !dev->exp.hpev_notified) {
- qemu_set_irq(dev->irq[dev->exp.hpev_intx], 0);
+ pci_irq_deassert(dev);
}
}
diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index ca762ab09a..32aa0c61b5 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -285,7 +285,7 @@ static void pcie_aer_root_notify(PCIDevice *dev)
} else if (msi_enabled(dev)) {
msi_notify(dev, pcie_aer_root_get_vector(dev));
} else {
- qemu_set_irq(dev->irq[dev->exp.aer_intx], 1);
+ pci_irq_assert(dev);
}
}
@@ -768,7 +768,7 @@ void pcie_aer_root_write_config(PCIDevice *dev,
uint32_t root_cmd = pci_get_long(aer_cap + PCI_ERR_ROOT_COMMAND);
/* 6.2.4.1.2 Interrupt Generation */
if (!msix_enabled(dev) && !msi_enabled(dev)) {
- qemu_set_irq(dev->irq[dev->exp.aer_intx], !!(root_cmd & enabled_cmd));
+ pci_set_irq(dev, !!(root_cmd & enabled_cmd));
return;
}