[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/38] pci_bridge: reclaim memory in instance_finali
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 26/38] pci_bridge: reclaim memory in instance_finalize instead of exit |
Date: |
Tue, 3 Sep 2013 14:33:17 +0200 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/pci-bridge/pci_bridge_dev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index 970a5b9..b33dc59 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -96,9 +96,15 @@ static void pci_bridge_dev_exitfn(PCIDevice *dev)
}
slotid_cap_cleanup(dev);
shpc_cleanup(dev, &bridge_dev->bar);
+ pci_bridge_exitfn(dev);
+}
+
+static void pci_bridge_dev_instance_finalize(Object *obj)
+{
+ PCIDevice *dev = PCI_DEVICE(obj);
+ PCIBridgeDev *bridge_dev = PCI_BRIDGE_DEV(obj);
shpc_free(dev);
memory_region_destroy(&bridge_dev->bar);
- pci_bridge_exitfn(dev);
pci_bridge_free(dev);
}
@@ -159,6 +165,7 @@ static const TypeInfo pci_bridge_dev_info = {
.parent = TYPE_PCI_BRIDGE,
.instance_size = sizeof(PCIBridgeDev),
.class_init = pci_bridge_dev_class_init,
+ .instance_finalize = pci_bridge_dev_instance_finalize,
};
static void pci_bridge_dev_register(void)
--
1.8.3.1
- [Qemu-devel] [PATCH 19/38] ne2000: use instance_finalize instead of exit, (continued)
- [Qemu-devel] [PATCH 19/38] ne2000: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 20/38] pcnet: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 22/38] vmxnet3: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 21/38] rtl8139: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 23/38] shpc: split shpc_free from shpc_cleanup, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 25/38] pcie_aer: pcie_aer_exit really frees stuff, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 24/38] pci_bridge: split pci_bridge_free from pci_bridge_exitfn, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 26/38] pci_bridge: reclaim memory in instance_finalize instead of exit,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 27/38] ioh4320: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 28/38] xio3130-downstream: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 29/38] xio3130-upstream: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 30/38] pcie: do not recreate mmcfg I/O region, use an alias instead, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 31/38] esp: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 32/38] lsi: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 34/38] usb-uhci: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 33/38] pvscsi: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 35/38] virtio-pci: reclaim memory in instance_finalize instead of exit, Paolo Bonzini, 2013/09/03
- [Qemu-devel] [PATCH 36/38] wdt_i6300esb: use instance_finalize instead of exit, Paolo Bonzini, 2013/09/03