MIPS: HIGHMEM DMA on noncoherent MIPS32 processors
authorDezhong Diao <dediao@cisco.com>
Wed, 13 Oct 2010 23:57:35 +0000 (16:57 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 25 Jul 2011 16:26:52 +0000 (17:26 +0100)
commite36863a550da44595b155c6b86ff46b50cbff5c0
tree62afb6746e304136bddec487a1361de22c48cc21
parentd0be89f6c2570a63ac44ccdd12473a54243cd296
MIPS: HIGHMEM DMA on noncoherent MIPS32 processors

[v4: Patch applies to linux-queue.git with kmap_atomic patches:
 https://patchwork.kernel.org/patch/189932/
 https://patchwork.kernel.org/patch/194552/
 https://patchwork.kernel.org/patch/189912/ ]

The MIPS DMA coherency functions do not work properly (i.e. kernel oops)
when HIGHMEM pages are passed in as arguments.  Use kmap_atomic() to
temporarily map high pages for cache maintenance operations.

Tested on a 2.6.36-rc7 1GB HIGHMEM SMP no-alias system.

Signed-off-by: Dezhong Diao <dediao@cisco.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: Dezhong Diao <dediao@cisco.com>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: David VomLehn <dvomlehn@cisco.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1695/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/dma-default.c