Re: [PATCHv9 0/6] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-08-10 Thread Vinod Koul
On Wed, Aug 10, 2016 at 01:22:13PM +0200, Niklas Söderlund wrote: > Hi, > > This series tries to solve the problem with DMA with device registers > (MMIO registers) that are behind an IOMMU for the rcar-dmac driver. A > recent patch '9575632 (dmaengine: make slave address physical)' > clarifies

Re: [PATCH v12 02/11] genirq/msi: msi_compose wrapper

2016-08-10 Thread Auger Eric
Hi Thomas, On 09/08/2016 11:19, Thomas Gleixner wrote: > On Tue, 2 Aug 2016, Eric Auger wrote: > >> Currently the MSI message is composed by directly calling >> irq_chip_compose_msi_msg and erased by setting the memory to zero. >> >> On some platforms, we will need to complexify this composition

Re: [PATCH v2] iommu/dma: Respect IOMMU aperture when allocating

2016-08-10 Thread Joerg Roedel
On Tue, Aug 09, 2016 at 05:31:35PM +0100, Robin Murphy wrote: > Where a device driver has set a 64-bit DMA mask to indicate the absence > of addressing limitations, we still need to ensure that we don't > allocate IOVAs beyond the actual input size of the IOMMU. The reported > aperture is the most

[PATCHv9 5/6] dmaengine: rcar-dmac: group slave configuration

2016-08-10 Thread Niklas Söderlund
Group slave address and transfer size in own structs for source and destination. This is in preparation for hooking up the dma-mapping API to the slave addresses. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart

[PATCHv9 3/6] dma-mapping: add dma_{map,unmap}_resource

2016-08-10 Thread Niklas Söderlund
Map/Unmap a device MMIO resource from a physical address. If no dma_map_ops method is available the operation is a no-op. Signed-off-by: Niklas Söderlund --- Documentation/DMA-API.txt | 22 +- include/linux/dma-mapping.h | 36

[PATCHv9 6/6] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-08-10 Thread Niklas Söderlund
Enable slave transfers to a device behind a IPMMU by mapping the slave addresses using the dma-mapping API. Signed-off-by: Niklas Söderlund --- drivers/dma/sh/rcar-dmac.c | 82 +- 1 file changed, 74

[PATCHv9 1/6] dma-mapping: add {map,unmap}_resource to dma_map_ops

2016-08-10 Thread Niklas Söderlund
Add methods to handle mapping of device resources from a physical address. This is needed for example to be able to map MMIO FIFO registers to a IOMMU. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart ---

[PATCHv9 0/6] dmaengine: rcar-dmac: add iommu support for slave transfers

2016-08-10 Thread Niklas Söderlund
Hi, This series tries to solve the problem with DMA with device registers (MMIO registers) that are behind an IOMMU for the rcar-dmac driver. A recent patch '9575632 (dmaengine: make slave address physical)' clarifies that DMA slave address provided by clients is the physical address. This puts

[PATCHv9 2/6] dma-debug: add support for resource mappings

2016-08-10 Thread Niklas Söderlund
A MMIO mapped resource can not be represented by a struct page so a new debug type is needed to handle this. This patch add such type and functionality to add/remove entries and how to translate them to a physical address. Signed-off-by: Niklas Söderlund

[PATCHv9 4/6] arm: dma-mapping: add {map, unmap}_resource for iommu ops

2016-08-10 Thread Niklas Söderlund
Add methods to map/unmap device resources addresses for dma_map_ops that are IOMMU aware. This is needed to map a device MMIO register from a physical address. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart