[Top] [All Lists]

RE: [PATCH] MIPS: Apply kmap_high_get on DMA functions.

To: "Kevin Cernekee" <>
Subject: RE: [PATCH] MIPS: Apply kmap_high_get on DMA functions.
From: "Dezhong Diao (dediao)" <>
Date: Mon, 26 Jul 2010 15:44:13 -0500
Authentication-results:; dkim=neutral (message not signed) header.i=none
Cc: <>, <>, "David VomLehn (dvomlehn)" <>
In-reply-to: <>
Original-recipient: rfc822;
Thread-index: Acsq3NA/mwAsAq+OTvaeXVMvXPhA6wCJYu+Q
Thread-topic: [PATCH] MIPS: Apply kmap_high_get on DMA functions.
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.


-----Original Message-----
From: Kevin Cernekee [] 
Sent: Friday, July 23, 2010 8:04 PM
To: Dezhong Diao (dediao)
Cc:;; David VomLehn
Subject: Re: [PATCH] MIPS: Apply kmap_high_get on DMA functions.

On Fri, Jul 23, 2010 at 6:43 PM, Dezhong Diao <> 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?


<Prev in Thread] Current Thread [Next in Thread>