提交 d7001198 编写于 作者: J Jan Nikitenko 提交者: Ralf Baechle

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: NJan Nikitenko <jan.nikitenko@gmail.com>
Acked-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 d56ffd38
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册