[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RESEND v2 10/16] dma: Let dma_memory_rw_relaxed() take MemTxAttrs
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH RESEND v2 10/16] dma: Let dma_memory_rw_relaxed() take MemTxAttrs argument |
Date: |
Thu, 1 Oct 2020 19:25:13 +0200 |
We will add the MemTxAttrs argument to dma_memory_rw() in
the next commit. Since dma_memory_rw_relaxed() is only used
by dma_memory_rw(), modify it first in a separate commit to
keep the next commit easier to review.
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>
---
include/sysemu/dma.h | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
index 608393d1b6..936b2c902b 100644
--- a/include/sysemu/dma.h
+++ b/include/sysemu/dma.h
@@ -83,9 +83,10 @@ static inline bool dma_memory_valid(AddressSpace *as,
static inline MemTxResult dma_memory_rw_relaxed(AddressSpace *as,
dma_addr_t addr,
void *buf, dma_addr_t len,
- DMADirection dir)
+ DMADirection dir,
+ MemTxAttrs attrs)
{
- return address_space_rw(as, addr, MEMTXATTRS_UNSPECIFIED,
+ return address_space_rw(as, addr, attrs,
buf, len, dir == DMA_DIRECTION_FROM_DEVICE);
}
@@ -93,7 +94,9 @@ static inline MemTxResult
dma_memory_read_relaxed(AddressSpace *as,
dma_addr_t addr,
void *buf, dma_addr_t len)
{
- return dma_memory_rw_relaxed(as, addr, buf, len, DMA_DIRECTION_TO_DEVICE);
+ return dma_memory_rw_relaxed(as, addr, buf, len,
+ DMA_DIRECTION_TO_DEVICE,
+ MEMTXATTRS_UNSPECIFIED);
}
static inline MemTxResult dma_memory_write_relaxed(AddressSpace *as,
@@ -102,7 +105,8 @@ static inline MemTxResult
dma_memory_write_relaxed(AddressSpace *as,
dma_addr_t len)
{
return dma_memory_rw_relaxed(as, addr, (void *)buf, len,
- DMA_DIRECTION_FROM_DEVICE);
+ DMA_DIRECTION_FROM_DEVICE,
+ MEMTXATTRS_UNSPECIFIED);
}
/**
@@ -124,7 +128,8 @@ static inline MemTxResult dma_memory_rw(AddressSpace *as,
dma_addr_t addr,
{
dma_barrier(as, dir);
- return dma_memory_rw_relaxed(as, addr, buf, len, dir);
+ return dma_memory_rw_relaxed(as, addr, buf, len, dir,
+ MEMTXATTRS_UNSPECIFIED);
}
/**
--
2.26.2
- [PATCH RESEND v2 00/16] hw: Let DMA/PCI API take MemTxAttrs argument and propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 01/16] pci: pass along the return value of dma_memory_rw, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 02/16] docs/devel/loads-stores: Add regexp for DMA functions, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 04/16] dma: Let dma_memory_set() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 05/16] dma: Let dma_memory_rw() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 03/16] dma: Document address_space_map/address_space_unmap() prototypes, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 06/16] dma: Let dma_memory_read() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 07/16] dma: Let dma_memory_write() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 09/16] dma: Let dma_memory_set() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 08/16] dma: Let dma_memory_valid() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 10/16] dma: Let dma_memory_rw_relaxed() take MemTxAttrs argument,
Philippe Mathieu-Daudé <=
- [PATCH RESEND v2 11/16] dma: Let dma_memory_rw() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 13/16] dma: Let dma_memory_map() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 12/16] dma: Let dma_memory_read/write() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 15/16] pci: Let pci_dma_read() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 16/16] pci: Let pci_dma_write() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- [PATCH RESEND v2 14/16] pci: Let pci_dma_rw() propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/01
- Re: [PATCH RESEND v2 00/16] hw: Let DMA/PCI API take MemTxAttrs argument and propagate MemTxResult, Philippe Mathieu-Daudé, 2020/10/22