diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2011-10-31 17:06:46 +1100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 16:52:05 -0500 |
commit | d32311810fd3da5b68912e71cec6c7e59b1ee3eb (patch) | |
tree | 21ebf986964d211bad623d52af7d3762c71d8fba /dma-helpers.c | |
parent | d9d1055ef1426da47b626883fffdc934c5f5ab91 (diff) | |
download | qemu-d32311810fd3da5b68912e71cec6c7e59b1ee3eb.zip qemu-d32311810fd3da5b68912e71cec6c7e59b1ee3eb.tar.gz qemu-d32311810fd3da5b68912e71cec6c7e59b1ee3eb.tar.bz2 |
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-helpers.c')
-rw-r--r-- | dma-helpers.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dma-helpers.c b/dma-helpers.c index 86d2d0a..bdcd38c 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -18,8 +18,7 @@ void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint) qsg->size = 0; } -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) { if (qsg->nsg == qsg->nalloc) { qsg->nalloc = 2 * qsg->nalloc + 1; @@ -45,7 +44,7 @@ typedef struct { bool to_dev; bool in_cancel; int sg_cur_index; - target_phys_addr_t sg_cur_byte; + dma_addr_t sg_cur_byte; QEMUIOVector iov; QEMUBH *bh; DMAIOFunc *io_func; |