powerpc/iommu: Support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 24 Jun 2015 05:25:31 +0000 (15:25 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 13 Jul 2015 00:10:55 +0000 (10:10 +1000)
commit817820b0226a1376f0fc68827ab8e42d86431117
tree89abc8109d548572af812a13de798fe0d4b32349
parente91c25111aa373af7439d97ab0e606bcffd599ef
powerpc/iommu: Support "hybrid" iommu/direct DMA ops for coherent_mask < dma_mask

This patch adds the ability to the DMA direct ops to fallback to the IOMMU
ops for coherent alloc/free if the coherent mask of the device isn't
suitable for accessing the direct DMA space and the device also happens
to have an active IOMMU table.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Kconfig
arch/powerpc/include/asm/dma-mapping.h
arch/powerpc/kernel/dma-iommu.c
arch/powerpc/kernel/dma-swiotlb.c
arch/powerpc/kernel/dma.c