From: Hiroshi DOYU Date: Mon, 2 Jul 2012 11:26:38 +0000 (+0300) Subject: iommu/tegra: smmu: Fix unsleepable memory allocation at alloc_pdir() X-Git-Tag: v3.6-rc1~111^2^5~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e971a03af736acc6f96c200c2626d3bcb3d6927;p=pandora-kernel.git iommu/tegra: smmu: Fix unsleepable memory allocation at alloc_pdir() alloc_pdir() is called from smmu_iommu_domain_init() with spin_lock held. memory allocations in alloc_pdir() had to be atomic. Instead of converting into atomic allocation, this patch once releases a lock, does the allocation, holds the lock again and then sees if it's raced or not in order to avoid introducing mutex and preallocation. Signed-off-by: Hiroshi DOYU Reported-by: Chris Wright Cc: Chris Wright Acked-by: Stephen Warren Signed-off-by: Joerg Roedel --- Reading git-diff-tree failed