On 8/10/2016 2:22 PM, niklas.soderlund+renesas at ragnatech.se (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 that DMA slave address provided by clients is the physical > address. This puts the task of mapping the DMA slave address from a > phys_addr_t to a dma_addr_t on the DMA engine. > > Without an IOMMU this is easy since the phys_addr_t and dma_addr_t are > the same and no special care is needed. However if you have a IOMMU you > need to map the DMA slave phys_addr_t to a dma_addr_t using something > like this.
Hi, I was wondering how this patchset compares against the dma_map_peer_resource() patches [1]. It seems they are intended for a similar use case, although perhaps I'm missing something. I see in these patches dma_map_resource gets just an address, while the dma_map_peer_resource API had instead a peer device struct, a resource struct and an offset. This seems to help an IOMMU implementation as it doesn't need to find the slave device from the PFN, right? Thanks, Haggai [1] https://patchwork.kernel.org/patch/7033041/ _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
