summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/dma-iommu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-06-24 15:25:31 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2015-07-13 10:10:55 +1000
commit817820b0226a1376f0fc68827ab8e42d86431117 (patch)
tree89abc8109d548572af812a13de798fe0d4b32349 /arch/powerpc/kernel/dma-iommu.c
parente91c25111aa373af7439d97ab0e606bcffd599ef (diff)
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>
Diffstat (limited to 'arch/powerpc/kernel/dma-iommu.c')
-rw-r--r--arch/powerpc/kernel/dma-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 4c68bfe4108a..41a7d9d49a5a 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -73,7 +73,7 @@ static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist,
}
/* We support DMA to/from any memory page via the iommu */
-static int dma_iommu_dma_supported(struct device *dev, u64 mask)
+int dma_iommu_dma_supported(struct device *dev, u64 mask)
{
struct iommu_table *tbl = get_iommu_table_base(dev);