road blocks for using dma-iommu on more than arm64

2017-10-01 Thread Christoph Hellwig
Hi all, are there any road blocks for using drivers/iommu/dma-iommu.c for more than just arm64, e.g. also for the Intel/AMD iommus? I've been trying to consolidate the giant amounts of duplicate code in the dma ops implementations for a while, and iommus that provide an iommu_api driver seems lik

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-10-01 Thread Christoph Hellwig
On Wed, Sep 27, 2017 at 10:13:51AM -0700, Dan Williams wrote: > As far as I can see "Offset can be greater than PAGE_SIZE" is the only > safe assumption for core code. It seems completely bogus to me, but if it is the current assumption we'll have to document it. But this brings me back to that o

Re: [PATCH v3] dma-debug: fix incorrect pfn calculation

2017-10-01 Thread Christoph Hellwig
On Wed, Sep 27, 2017 at 11:23:52AM +0100, Robin Murphy wrote: > > I found that debug_dma_alloc_coherent() and debug_dma_free_coherent() > > assume that dma_alloc_coherent() always returns a linear address. > > However it's possible that dma_alloc_coherent() returns a non-linear > > address. In this