Skip to content

Commit

Permalink
MIPS: Fix oops in dma_unmap_page on not coherent mips platforms
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Nikitenko authored and Ralf Baechle committed Mar 23, 2009
1 parent d56ffd3 commit d700119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/mm/dma-default.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d700119

Please sign in to comment.