[PATCHv2 3/3] arm64: Use arm64 coherent APIs for non-coherent freeing
Laura Abbott
lauraa at codeaurora.org
Fri Mar 14 15:52:25 EDT 2014
The noncoherent free function currently unconditionally frees
back to the page allocator which is incorrect for CMA pages.
call the coherent free function to correctly differentiate
between pages.
Signed-off-by: Laura Abbott <lauraa at codeaurora.org>
---
arch/arm64/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 608c343..99ff063 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -104,7 +104,7 @@ static void arm64_swiotlb_free_noncoherent(struct device *dev, size_t size,
void *swiotlb_addr = phys_to_virt(dma_to_phys(dev, dma_handle));
vunmap(vaddr);
- swiotlb_free_coherent(dev, size, swiotlb_addr, dma_handle);
+ arm64_swiotlb_free_coherent(dev, size, swiotlb_addr, dma_handle, attrs);
}
static dma_addr_t arm64_swiotlb_map_page(struct device *dev,
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
More information about the linux-arm-kernel
mailing list