diff options
author | Jan Nikitenko <jan.nikitenko@gmail.com> | 2008-11-28 08:52:58 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-03-23 23:38:04 +0100 |
commit | d7001198366bffce4506ba21b7b0fee2de194f73 (patch) | |
tree | d6fc12a93c413fc913b2652fc51a0f0d5265787b /arch/mips/mm/dma-default.c | |
parent | d56ffd38a93841a07c839a375049a56b51e9567c (diff) | |
download | linux-d7001198366bffce4506ba21b7b0fee2de194f73.tar.gz linux-d7001198366bffce4506ba21b7b0fee2de194f73.tar.bz2 linux-d7001198366bffce4506ba21b7b0fee2de194f73.zip |
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/dma-default.c')
-rw-r--r-- | arch/mips/mm/dma-default.c | 2 |
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); } |