[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 10/39] hw/pcie: AER and hot-plug events must use d
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 10/39] hw/pcie: AER and hot-plug events must use device's interrupt |
Date: |
Tue, 15 Oct 2013 09:30:39 +0300 |
From: Marcel Apfelbaum <address@hidden>
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 <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/pci/pcie.h | 18 ------------------
hw/pci/pcie.c | 4 ++--
hw/pci/pcie_aer.c | 4 ++--
3 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index c010007..1966169 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -64,15 +64,6 @@ struct PCIExpressDevice {
uint8_t exp_cap;
/* SLOT */
- unsigned int hpev_intx; /* INTx for hot plug event (0-3:INT[A-D]#)
- * default is 0 = INTA#
- * If the chip wants to use other interrupt
- * line, initialize this member with the
- * desired number.
- * If the chip dynamically changes this member,
- * also initialize it when loaded as
- * appropreately.
- */
bool hpev_notified; /* Logical AND of conditions for hot plug event.
Following 6.7.3.4:
Software Notification of Hot-Plug Events, an interrupt
@@ -82,15 +73,6 @@ struct PCIExpressDevice {
/* AER */
uint16_t aer_cap;
PCIEAERLog aer_log;
- unsigned int aer_intx; /* INTx for error reporting
- * default is 0 = INTA#
- * If the chip wants to use other interrupt
- * line, initialize this member with the
- * desired number.
- * If the chip dynamically changes this member,
- * also initialize it when loaded as
- * appropreately.
- */
};
/* PCI express capability helper functions */
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 50af3c1..268a696 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 ca762ab..32aa0c6 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;
}
--
MST
- [Qemu-devel] [PULL v2 00/39] pci, pc, acpi fixes, enhancements, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 01/39] memory: Change MemoryRegion priorities from unsigned to signed, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 02/39] docs/memory: Explictly state that MemoryRegion priority is signed, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 03/39] hw/pci: partially handle pci master abort, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 04/39] hw/core: Add interface to allocate and free a single IRQ, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 05/39] hw/pci: add pci wrappers for allocating and asserting irqs, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 06/39] hw/pci-bridge: set PCI_INTERRUPT_PIN register before shpc init, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 07/39] hw/vmxnet3: set interrupts using pci irq wrappers, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 08/39] hw/vfio: set interrupts using pci irq wrappers, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 10/39] hw/pcie: AER and hot-plug events must use device's interrupt,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 11/39] hw/pci: removed irq field from PCIDevice, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 09/39] hw: set interrupts using pci irq wrappers, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 12/39] cleanup object.h: include error.h directly, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 13/39] qom: cleanup struct Error references, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 14/39] qom: add pointer to int property helpers, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 15/39] pci: fix up w64 size calculation helper, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 16/39] fw_cfg: interface to trigger callback on read, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 17/39] loader: support for unmapped ROM blobs, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 18/39] pcie_host: expose UNMAPPED macro, Michael S. Tsirkin, 2013/10/15
- [Qemu-devel] [PULL v2 19/39] pcie_host: expose address format, Michael S. Tsirkin, 2013/10/15