diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-09-03 11:00:47 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-30 17:16:32 +0100 |
commit | a1d4b0a3051b3079c8db607f519bc0fcb30e17ec (patch) | |
tree | 4e21aaee0b22bc95cc9d749282e664db759cbc13 /include/sysemu | |
parent | ba06fe8add5b788956a7317246c6280dfc157040 (diff) | |
download | qemu-a1d4b0a3051b3079c8db607f519bc0fcb30e17ec.zip qemu-a1d4b0a3051b3079c8db607f519bc0fcb30e17ec.tar.gz qemu-a1d4b0a3051b3079c8db607f519bc0fcb30e17ec.tar.bz2 |
dma: Let dma_memory_map() take MemTxAttrs argument
Let devices specify transaction attributes when calling
dma_memory_map().
Patch created mechanically using spatch with this script:
@@
expression E1, E2, E3, E4;
@@
- dma_memory_map(E1, E2, E3, E4)
+ dma_memory_map(E1, E2, E3, E4, MEMTXATTRS_UNSPECIFIED)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20211223115554.3155328-7-philmd@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/dma.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index 522682b..97ff6f2 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -202,16 +202,17 @@ MemTxResult dma_memory_set(AddressSpace *as, dma_addr_t addr, * @addr: address within that address space * @len: pointer to length of buffer; updated on return * @dir: indicates the transfer direction + * @attrs: memory attributes */ static inline void *dma_memory_map(AddressSpace *as, dma_addr_t addr, dma_addr_t *len, - DMADirection dir) + DMADirection dir, MemTxAttrs attrs) { hwaddr xlen = *len; void *p; p = address_space_map(as, addr, &xlen, dir == DMA_DIRECTION_FROM_DEVICE, - MEMTXATTRS_UNSPECIFIED); + attrs); *len = xlen; return p; } |