aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-04-10 18:15:49 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-06-20 16:39:52 +0200
commitdf32fd1c9f53dd3b7abd28e29f851965039eabda (patch)
tree37996235c390c2c368f595090642b1aedea3b5db /hw/pci
parent96478592a93f93322ecc20d0a6eccb4d4ef33c7a (diff)
dma: eliminate DMAContext
The DMAContext is a simple pointer to an AddressSpace that is now always already available. Make everyone hold the address space directly, and clean up the DMA API to use the AddressSpace directly. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pci.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index ed9c8a1f91..104fe711b6 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -815,8 +815,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
dma_as->root, 0, memory_region_size(dma_as->root));
memory_region_set_enabled(&pci_dev->bus_master_enable_region, false);
address_space_init(&pci_dev->bus_master_as, &pci_dev->bus_master_enable_region);
- pci_dev->dma = g_new(DMAContext, 1);
- dma_context_init(pci_dev->dma, &pci_dev->bus_master_as);
pci_dev->devfn = devfn;
pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);
@@ -873,8 +871,6 @@ static void do_pci_unregister_device(PCIDevice *pci_dev)
address_space_destroy(&pci_dev->bus_master_as);
memory_region_destroy(&pci_dev->bus_master_enable_region);
- g_free(pci_dev->dma);
- pci_dev->dma = NULL;
}
static void pci_unregister_io_regions(PCIDevice *pci_dev)