Re: [PATCH v3 3/4] arm64: Add IOMMU dma_ops

2015-07-15 Thread Catalin Marinas
On Wed, Jul 15, 2015 at 05:27:22PM +0100, Robin Murphy wrote: > On 15/07/15 10:31, Catalin Marinas wrote: > >On Fri, Jul 10, 2015 at 08:19:34PM +0100, Robin Murphy wrote: > >>+ if (iommu_dma_mapping_error(dev, *handle)) { > >>+ if (coherent) > >>+

Re: [PATCH v3 3/4] arm64: Add IOMMU dma_ops

2015-07-15 Thread Robin Murphy
On 15/07/15 10:31, Catalin Marinas wrote: On Fri, Jul 10, 2015 at 08:19:34PM +0100, Robin Murphy wrote: diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index d16a1ce..ccadfd4 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -526,3 +526,426 @@ s

Re: [PATCH v3 3/4] arm64: Add IOMMU dma_ops

2015-07-15 Thread Catalin Marinas
On Fri, Jul 10, 2015 at 08:19:34PM +0100, Robin Murphy wrote: > diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c > index d16a1ce..ccadfd4 100644 > --- a/arch/arm64/mm/dma-mapping.c > +++ b/arch/arm64/mm/dma-mapping.c > @@ -526,3 +526,426 @@ static int __init dma_debug_do_init(

[PATCH v3 3/4] arm64: Add IOMMU dma_ops

2015-07-10 Thread Robin Murphy
Taking some inspiration from the arch/arm code, implement the arch-specific side of the DMA mapping ops using the new IOMMU-DMA layer. Unfortunately the device setup code has to start out as a big ugly mess in order to work usefully right now, as 'proper' operation depends on changes to device pro