Thread (7 messages) flat view 7 messages, 3 authors, 2013-01-10

[PATCH v5 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules

From: joro@8bytes.org (Joerg Roedel)
Date: 2013-01-10 18:32:43
Also in: linux-iommu, linux-sh, lkml

Hi,

On Mon, Jan 07, 2013 at 07:11:58PM +0100, Laurent Pinchart wrote:
quoted
+		l2index = (iova >> 12) & 0xff;
+		spin_lock(&sh_domain->map_lock);
+		ret = l2alloc(sh_domain, l1index);
l2alloc calls dma_pool_alloc(GFP_KERNEL), that not safe in a non-sleepable 
context. Do we need a spinlock here, or could a mutex do ?
iommu_map should work in any context, so a mutex will not work. Also the
memory allocations in that path should be GFP_ATOMIC instead of
GFP_KERNEL.

Other than that this driver looks good from an IOMMU-API perspective.
Please Cc me on future versions of this patch-set directly.

Thanks,

	Joerg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help