[RFC 23/34] dmaengine: PL08x: re-jig the starting of txds
From: Russell King - ARM Linux <hidden>
Date: 2012-06-01 10:52:28
On Thu, May 31, 2012 at 09:14:15AM +0800, Linus Walleij wrote:
On Tue, May 29, 2012 at 5:43 PM, Russell King [off-list ref] wrote:quoted
Rather than code the de-queue of the txd several times, move that into the start_txd function. ?Rename this to better illustrate what it's now doing, and call this function when starting a delayed memcpy(). Signed-off-by: Russell King <redacted>quoted
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* Eww. ?We know this isn't going to deadlock + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* but lockdep probably doens't.Speling...quoted
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?*/ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? spin_lock(&waiting->lock); + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? pl08x_start_next_txd(waiting); + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? spin_unlock(&waiting->lock);I've seen this construct in the past and have no better suggestions...
I have no way to test whether my statement is true as I can't get enough DMA engine usage through the PL011 transmit support to check what happens. So the statement is purely theoretical.
Acked-by: Linus Walleij <redacted> Yours, Linus Walleij