summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc/spapr.h
diff options
context:
space:
mode:
authorPaolo Bonzini2013-04-10 17:30:48 +0200
committerPaolo Bonzini2013-06-20 16:32:47 +0200
commit2b7dc949e241ac2b069d2d6183c1346cad792662 (patch)
tree036435406f192d463a234f7df11678dc61bec7c4 /include/hw/ppc/spapr.h
parentvfio: abort if an emulated iommu is used (diff)
downloadqemu-2b7dc949e241ac2b069d2d6183c1346cad792662.tar.gz
qemu-2b7dc949e241ac2b069d2d6183c1346cad792662.tar.xz
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 'include/hw/ppc/spapr.h')
-rw-r--r--include/hw/ppc/spapr.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 864bee9d00..e8d617b417 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -342,17 +342,19 @@ typedef struct sPAPRTCE {
#define RTAS_ERROR_LOG_MAX 2048
+typedef struct sPAPRTCETable sPAPRTCETable;
void spapr_iommu_init(void);
void spapr_events_init(sPAPREnvironment *spapr);
void spapr_events_fdt_skel(void *fdt, uint32_t epow_irq);
-DMAContext *spapr_tce_new_dma_context(uint32_t liobn, size_t window_size);
-void spapr_tce_free(DMAContext *dma);
-void spapr_tce_reset(DMAContext *dma);
-void spapr_tce_set_bypass(DMAContext *dma, bool bypass);
+sPAPRTCETable *spapr_tce_new_table(uint32_t liobn, size_t window_size);
+DMAContext *spapr_tce_get_dma(sPAPRTCETable *tcet);
+void spapr_tce_free(sPAPRTCETable *tcet);
+void spapr_tce_reset(sPAPRTCETable *tcet);
+void spapr_tce_set_bypass(sPAPRTCETable *tcet, bool bypass);
int spapr_dma_dt(void *fdt, int node_off, const char *propname,
uint32_t liobn, uint64_t window, uint32_t size);
int spapr_tcet_dma_dt(void *fdt, int node_off, const char *propname,
- DMAContext *dma);
+ sPAPRTCETable *tcet);
#endif /* !defined (__HW_SPAPR_H__) */