summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorJan Nikitenko <jan.nikitenko@gmail.com>2008-11-28 08:52:58 +0100
committerRalf Baechle <ralf@linux-mips.org>2009-03-23 23:38:04 +0100
commitd7001198366bffce4506ba21b7b0fee2de194f73 (patch)
treed6fc12a93c413fc913b2652fc51a0f0d5265787b /arch/mips/mm
parentd56ffd38a93841a07c839a375049a56b51e9567c (diff)
downloadlinux-d7001198366bffce4506ba21b7b0fee2de194f73.tar.bz2
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 <jan.nikitenko@gmail.com> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/dma-default.c2
1 files changed, 1 insertions, 1 deletions
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);
}