|author||David Brownell <email@example.com>||2007-08-10 13:10:27 -0700|
|committer||Greg Kroah-Hartman <firstname.lastname@example.org>||2007-10-12 15:03:15 -0700|
dma_free_coherent() needs irqs enabled (sigh)
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 2005, caused by ARM SMP updates.) This little surprise can be annoyingly driver-visible. Since it looks like that restriction won't be removed, this patch changes the definition of the API to include that requirement. Also, to help catch nonportable drivers, it updates the x86 and swiotlb versions to include the relevant warnings. (I already observed that it trips on the bus_reset_tasklet of the new firewire_ohci driver.) Signed-off-by: David Brownell <email@example.com> Cc: David Miller <firstname.lastname@example.org> Acked-by: Russell King <email@example.com> Cc: Andi Kleen <firstname.lastname@example.org> Signed-off-by: Andrew Morton <email@example.com> Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>
Diffstat (limited to 'Documentation/DMA-API.txt')
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index cc7a8c39fb6..b939ebb6287 100644
@@ -68,6 +68,9 @@ size and dma_handle must all be the same as those passed into the
consistent allocate. cpu_addr must be the virtual address returned by
the consistent allocate.
+Note that unlike their sibling allocation calls, these routines
+may only be called with IRQs enabled.
Part Ib - Using small dma-coherent buffers