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.
From: Kevin Cernekee [mailto:firstname.lastname@example.org]
Sent: Friday, July 23, 2010 8:04 PM
To: Dezhong Diao (dediao)
Cc: email@example.com; firstname.lastname@example.org; David VomLehn
Subject: Re: [PATCH] MIPS: Apply kmap_high_get on DMA functions.
On Fri, Jul 23, 2010 at 6:43 PM, Dezhong Diao <email@example.com> 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:
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?