alloc/free
From: Christoph Hellwig
Date: Wed Dec 12 2018 - 09:11:38 EST
---
arch/powerpc/kernel/dma.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index f53d11d35230..d3db6d879559 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -176,8 +176,13 @@ static inline void dma_nommu_sync_single(struct device *dev,
#endif
const struct dma_map_ops dma_nommu_ops = {
+#ifdef CONFIG_NOT_COHERENT_CACHE
.alloc = __dma_nommu_alloc_coherent,
.free = __dma_nommu_free_coherent,
+#else
+ .alloc = dma_direct_alloc,
+ .free = dma_direct_free,
+#endif
.map_sg = dma_nommu_map_sg,
.dma_supported = dma_direct_supported,
.map_page = dma_nommu_map_page,
--
2.19.2
--Qxx1br4bt0+wmkIi--