From: Jan Nikitenko Date: Fri, 28 Nov 2008 07:52:58 +0000 (+0100) Subject: MIPS: Fix oops in dma_unmap_page on not coherent mips platforms X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7001198366bffce4506ba21b7b0fee2de194f73;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git MIPS: Fix oops in dma_unmap_page on not coherent mips platforms dma_cache_wback_inv() expects virtual address, but physical was provided due to translation via plat_dma_addr_to_phys(). If replaced with dma_addr_to_virt(), page fault oops from dma_unmap_page() is gone on au1550 platform. Signed-off-by: Jan Nikitenko Acked-by: Atsushi Nemoto Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 546e6977d4ff..bed56f1ac837 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c @@ -225,7 +225,7 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, if (!plat_device_is_coherent(dev) && direction != DMA_TO_DEVICE) { unsigned long addr; - addr = plat_dma_addr_to_phys(dma_address); + addr = dma_addr_to_virt(dma_address); dma_cache_wback_inv(addr, size); }