[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RESEND v2 08/16] dma: Let dma_memory_valid() take MemTxAttrs argu
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH RESEND v2 08/16] dma: Let dma_memory_valid() take MemTxAttrs argument |
Date: |
Thu, 1 Oct 2020 19:25:11 +0200 |
Let devices specify transaction attributes when calling
dma_memory_valid().
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/hw/ppc/spapr_vio.h | 2 +-
include/sysemu/dma.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h
index 356751e2d7..ed28db6604 100644
--- a/include/hw/ppc/spapr_vio.h
+++ b/include/hw/ppc/spapr_vio.h
@@ -91,7 +91,7 @@ static inline void spapr_vio_irq_pulse(SpaprVioDevice *dev)
static inline bool spapr_vio_dma_valid(SpaprVioDevice *dev, uint64_t taddr,
uint32_t size, DMADirection dir)
{
- return dma_memory_valid(&dev->as, taddr, size, dir);
+ return dma_memory_valid(&dev->as, taddr, size, dir,
MEMTXATTRS_UNSPECIFIED);
}
static inline int spapr_vio_dma_read(SpaprVioDevice *dev, uint64_t taddr,
diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
index a052f7bca3..a5cd7a98ff 100644
--- a/include/sysemu/dma.h
+++ b/include/sysemu/dma.h
@@ -73,11 +73,11 @@ static inline void dma_barrier(AddressSpace *as,
DMADirection dir)
* dma_memory_{read,write}() and check for errors */
static inline bool dma_memory_valid(AddressSpace *as,
dma_addr_t addr, dma_addr_t len,
- DMADirection dir)
+ DMADirection dir, MemTxAttrs attrs)
{
return address_space_access_valid(as, addr, len,
dir == DMA_DIRECTION_FROM_DEVICE,
- MEMTXATTRS_UNSPECIFIED);
+ attrs);
}
static inline MemTxResult dma_memory_rw_relaxed(AddressSpace *as,
--
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é <=
- [PATCH RESEND v2 10/16] dma: Let dma_memory_rw_relaxed() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/10/01
- [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