diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-06-24 15:25:31 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-07-13 10:10:55 +1000 |
commit | 817820b0226a1376f0fc68827ab8e42d86431117 (patch) | |
tree | 89abc8109d548572af812a13de798fe0d4b32349 /arch/powerpc/kernel/dma-swiotlb.c | |
parent | e91c25111aa373af7439d97ab0e606bcffd599ef (diff) | |
download | op-kernel-dev-817820b0226a1376f0fc68827ab8e42d86431117.zip op-kernel-dev-817820b0226a1376f0fc68827ab8e42d86431117.tar.gz |
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-swiotlb.c')
-rw-r--r-- | arch/powerpc/kernel/dma-swiotlb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c index 6e8d764..c6689f6 100644 --- a/arch/powerpc/kernel/dma-swiotlb.c +++ b/arch/powerpc/kernel/dma-swiotlb.c @@ -47,8 +47,8 @@ static u64 swiotlb_powerpc_get_required(struct device *dev) * for everything else. */ struct dma_map_ops swiotlb_dma_ops = { - .alloc = dma_direct_alloc_coherent, - .free = dma_direct_free_coherent, + .alloc = __dma_direct_alloc_coherent, + .free = __dma_direct_free_coherent, .mmap = dma_direct_mmap_coherent, .map_sg = swiotlb_map_sg_attrs, .unmap_sg = swiotlb_unmap_sg_attrs, |