diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-04-10 17:30:48 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-20 16:32:47 +0200 |
commit | 2b7dc949e241ac2b069d2d6183c1346cad792662 (patch) | |
tree | 036435406f192d463a234f7df11678dc61bec7c4 /hw/ppc/spapr_pci.c | |
parent | 06d985f5d844d07d31b4dada20f4ff6cf0d6ff4a (diff) | |
download | qemu-2b7dc949e241ac2b069d2d6183c1346cad792662.tar.gz qemu-2b7dc949e241ac2b069d2d6183c1346cad792662.tar.bz2 qemu-2b7dc949e241ac2b069d2d6183c1346cad792662.zip |
spapr: convert TCE API to use an opaque type
The TCE table is currently returned as a DMAContext, and non-type-safe
APIs are called later passing back the DMAContext. Since we want to move
away from DMAContext, use an opaque type instead, and add an accessor
to retrieve the DMAContext from it.
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ppc/spapr_pci.c')
-rw-r--r-- | hw/ppc/spapr_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 62ff323f73..eb64a8f997 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -511,7 +511,7 @@ static DMAContext *spapr_pci_dma_context_fn(PCIBus *bus, void *opaque, { sPAPRPHBState *phb = opaque; - return phb->dma; + return spapr_tce_get_dma(phb->tcet); } static int spapr_phb_init(SysBusDevice *s) @@ -646,8 +646,8 @@ static int spapr_phb_init(SysBusDevice *s) sphb->dma_window_start = 0; sphb->dma_window_size = 0x40000000; - sphb->dma = spapr_tce_new_dma_context(sphb->dma_liobn, sphb->dma_window_size); - if (!sphb->dma) { + sphb->tcet = spapr_tce_new_table(sphb->dma_liobn, sphb->dma_window_size); + if (!sphb->tcet) { fprintf(stderr, "Unable to create TCE table for %s\n", sphb->dtbusname); return -1; } @@ -676,7 +676,7 @@ static void spapr_phb_reset(DeviceState *qdev) sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s); /* Reset the IOMMU state */ - spapr_tce_reset(sphb->dma); + spapr_tce_reset(sphb->tcet); } static Property spapr_phb_properties[] = { |