It is not a problem our hardware supports DMA directly to high memory. It reminds me we submitted a patch which fixed problem when the high memory is used for DMA, but it wasn't accepted. Dezhong -----Original Message----- From: Kevin Cernekee [mailto:cernekee@xxxxxxxxx] Sent: Friday, July 23, 2010 8:04 PM To: Dezhong Diao (dediao) Cc: linux-mips@xxxxxxxxxxxxxx; ralf@xxxxxxxxxxxxxx; David VomLehn (dvomlehn) Subject: Re: [PATCH] MIPS: Apply kmap_high_get on DMA functions. On Fri, Jul 23, 2010 at 6:43 PM, Dezhong Diao <dediao@xxxxxxxxx> wrote: > I don't recommend to do that in such a way (such as ARM does). In > MIPS, we normally setup the mapping before the dma function is invoked. That means there is something wrong if addr is 0. I don't understand the HIGHMEM / VM code well enough yet to intelligently comment on this assumption. And it looks like the ARM developers are still trying to sort out whether their code is doing the right thing in all circumstances: http://www.spinics.net/lists/arm-kernel/msg89465.html But if the (addr == 0) condition should never occur on a properly functioning system, I would rather see an error message than be forced to debug a mysterious coherency problem caused by missing flushes. Any chance you could add a BUG() in the else clause? BTW: are you supporting DMA directly to high memory? Thanks.