linux-mips
[Top] [All Lists]

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

To: "Kevin Cernekee" <cernekee@gmail.com>
Subject: RE: [PATCH] MIPS: Apply kmap_high_get on DMA functions.
From: "Dezhong Diao (dediao)" <dediao@cisco.com>
Date: Mon, 26 Jul 2010 15:44:13 -0500
Authentication-results: rtp-iport-2.cisco.com; dkim=neutral (message not signed) header.i=none
Cc: <linux-mips@linux-mips.org>, <ralf@linux-mips.org>, "David VomLehn (dvomlehn)" <dvomlehn@cisco.com>
In-reply-to: <AANLkTinBb3SN1DRL9Zt8Mu1fAYgsx9VRm4FwBz4oNfdq@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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.


Dezhong


-----Original Message-----
From: Kevin Cernekee [mailto:cernekee@gmail.com] 
Sent: Friday, July 23, 2010 8:04 PM
To: Dezhong Diao (dediao)
Cc: linux-mips@linux-mips.org; ralf@linux-mips.org; 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@cisco.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:

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.

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