Thread (9 messages) 9 messages, 3 authors, 2012-08-22

[PATCHv6 2/2] ARM: dma-mapping: remove custom consistent dma region

From: Hiroshi Doyu <hidden>
Date: 2012-08-21 13:00:15
Also in: linux-mm, lkml

Russell King - ARM Linux [off-list ref] wrote @ Tue, 21 Aug 2012 14:34:51 +0200:
On Tue, Aug 21, 2012 at 02:22:35PM +0300, Hiroshi Doyu wrote:
quoted
The following "__get_vm_area_node()" can take gfp_mask, it means that
this function is expected to be called from atomic context, but why
it's _NOT_ allowed _ONLY_ from interrupt context?
One reason is it takes read/write locks without using the IRQ safe
versions for starters (vmap_area_lock and vmlist_lock).  I don't see
any other reasons in that bit of code though.
IIRC, if *_{irqsave,irqrestore} versions were introduced to protect
from IRQ context, could we remove this BUG_ON(in_interrupt()) in
__get_vm_area_node() at least? Or is it not encouraged from
performance POV?

It seems that the solution to allow IOMMU'able device driver to
allocate from ISR are:
(1) To provide the pre-allocate area like arm_dma_alloc() does,
or
(2) __get_vm_area_node() can be called from ISR.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help