Re: [patch 2.6.23-rc1] dma_free_coherent() needs irqs enabled (sigh)

From: David Brownell
Date: Tue Jul 24 2007 - 19:08:26 EST


On Tuesday 24 July 2007, Russell King wrote:
> On Tue, Jul 24, 2007 at 02:29:05PM -0700, David Brownell wrote:
> > On at least ARM (and I'm told MIPS too) dma_free_coherent() has a newish
> > call context requirement: unlike its dma_alloc_coherent() sibling, it
> > may not be called with IRQs disabled. (This was new behavior on ARM as
> > of late 2006, caused by ARM SMP updates.)
>
> I think you got the year wrong:
>
> 5edf71ae (Russell King 2005-11-25 15:52:51 +0000 364) WARN_ON(irqs_disabled());
>
> which is due to this commit:
>
> [ARM] Do not call flush_tlb_kernel_range() with IRQs disabled.

This little "to do" list item has been sitting in my mailbox way
too long then. Certainly since it was fair to say "last year"! ;)

Of course, 2.6.23-rc1 also merges all the gadget API updates I
included to cope with this annoyance. So with any luck the issue
will now finally have been properly whupped.


> Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>

Thanks...


> > Since it looks like that restriction won't be removed, this patch changes
> > the definition of the API to include that requirement.
>
> The PCI DMA-mapping API had this restriction. For some reason, this
> restriction was not carried forward into the DMA-API. Unfortunately
> the restriction can not be removed without causing the problems
> described in the commit which introduced it.

Right, I noticed that.

- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/