aboutsummaryrefslogtreecommitdiffstats
path: root/dma.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-10-31 17:06:46 +1100
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-01 16:52:05 -0500
commitd32311810fd3da5b68912e71cec6c7e59b1ee3eb (patch)
tree21ebf986964d211bad623d52af7d3762c71d8fba /dma.h
parentd9d1055ef1426da47b626883fffdc934c5f5ab91 (diff)
Use dma_addr_t type for scatter/gather code
This patch uses the newly created dma_addr_t type throughout the scatter/gather handling code in dma-helpers.c whenever we need to represent a dma bus address. This makes a better distinction as to what is a bus address and what is a cpu physical address. Since we don't support IOMMUs yet, they can't be very different for now, but that will change in future, and this preliminary helps clarify what's going on. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'dma.h')
-rw-r--r--dma.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/dma.h b/dma.h
index 56e163a58..a13209d7e 100644
--- a/dma.h
+++ b/dma.h
@@ -28,20 +28,19 @@ typedef enum {
} DMADirection;
struct ScatterGatherEntry {
- target_phys_addr_t base;
- target_phys_addr_t len;
+ dma_addr_t base;
+ dma_addr_t len;
};
struct QEMUSGList {
ScatterGatherEntry *sg;
int nsg;
int nalloc;
- target_phys_addr_t size;
+ dma_addr_t size;
};
void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);
-void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base,
- target_phys_addr_t len);
+void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len);
void qemu_sglist_destroy(QEMUSGList *qsg);
#endif