diff options
author | Jan Nikitenko <jan.nikitenko@gmail.com> | 2008-11-28 07:52:58 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-03-23 22:38:04 (GMT) |
commit | d7001198366bffce4506ba21b7b0fee2de194f73 (patch) | |
tree | d6fc12a93c413fc913b2652fc51a0f0d5265787b /arch | |
parent | d56ffd38a93841a07c839a375049a56b51e9567c (diff) | |
download | linux-fsl-qoriq-d7001198366bffce4506ba21b7b0fee2de194f73.tar.xz |
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')
-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 546e697..bed56f1 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); } |