aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-06-24 01:25:31 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2015-07-12 20:10:55 -0400
commit817820b0226a1376f0fc68827ab8e42d86431117 (patch)
tree89abc8109d548572af812a13de798fe0d4b32349 /arch/powerpc/include
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/include')
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 9cbbc9e415fe..710f60e380e0 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -21,12 +21,12 @@
21#define DMA_ERROR_CODE (~(dma_addr_t)0x0) 21#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
22 22
23/* Some dma direct funcs must be visible for use in other dma_ops */ 23/* Some dma direct funcs must be visible for use in other dma_ops */
24extern void *dma_direct_alloc_coherent(struct device *dev, size_t size, 24extern void *__dma_direct_alloc_coherent(struct device *dev, size_t size,
25 dma_addr_t *dma_handle, gfp_t flag, 25 dma_addr_t *dma_handle, gfp_t flag,
26 struct dma_attrs *attrs);
27extern void __dma_direct_free_coherent(struct device *dev, size_t size,
28 void *vaddr, dma_addr_t dma_handle,
26 struct dma_attrs *attrs); 29 struct dma_attrs *attrs);
27extern void dma_direct_free_coherent(struct device *dev, size_t size,
28 void *vaddr, dma_addr_t dma_handle,
29 struct dma_attrs *attrs);
30extern int dma_direct_mmap_coherent(struct device *dev, 30extern int dma_direct_mmap_coherent(struct device *dev,
31 struct vm_area_struct *vma, 31 struct vm_area_struct *vma,
32 void *cpu_addr, dma_addr_t handle, 32 void *cpu_addr, dma_addr_t handle,