[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/19] pci: clean up resetting of IRQs
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 14/19] pci: clean up resetting of IRQs |
Date: |
Mon, 23 Dec 2013 18:12:10 +0200 |
From: Paolo Bonzini <address@hidden>
pci_device_reset will deassert the INTX pins, and this will make the
irq_count array all-zeroes. Check that this is the case, and remove
the existing loop which might even unsync irq_count and irq_state.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/pci/pci.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 83ea0a0..131e599 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -217,15 +217,16 @@ static int pcibus_reset(BusState *qbus)
PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus);
int i;
- for (i = 0; i < bus->nirq; i++) {
- bus->irq_count[i] = 0;
- }
for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {
if (bus->devices[i]) {
pci_device_reset(bus->devices[i]);
}
}
+ for (i = 0; i < bus->nirq; i++) {
+ assert(bus->irq_count[i] == 0);
+ }
+
/* topology traverse is done by pci_bus_reset().
Tell qbus/qdev walker not to traverse the tree */
return 1;
--
MST
- [Qemu-devel] [PULL 05/19] i440fx-test: give each GTest case its own qtest, (continued)
- [Qemu-devel] [PULL 05/19] i440fx-test: give each GTest case its own qtest, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 06/19] i440fx-test: generate temporary firmware blob, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 07/19] i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 08/19] acpi: piix4: remove not needed GPE0 mask, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 09/19] acpi: factor out common pm_update_sci() into acpi core, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 10/19] acpi: ich9: allow guest to clear SCI rised by GPE, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 11/19] ACPI: Q35 DSDT: fix CPU hotplug GPE0.2 handler, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 12/19] ACPI/DSDT-CPU: cleanup bogus comment, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 13/19] pci: do not export pci_bus_reset, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 15/19] qdev: allow both pre- and post-order vists in qdev walking functions, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 14/19] pci: clean up resetting of IRQs,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 17/19] piix: fix 32bit pci hole, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 16/19] qdev: switch reset to post-order, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 18/19] virtio: add back call to virtio_bus_device_unplugged, Michael S. Tsirkin, 2013/12/23
- [Qemu-devel] [PULL 19/19] target-arm: fix build with gcc 4.8.2, Michael S. Tsirkin, 2013/12/23