aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2014-01-16 15:39:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 21:30:01 -0800
commit1dca10b4c8528298fe5cf40cdbf4a480f9b0a429 (patch)
tree54680d5d63d22c82e8fad99cc7db8f873ae5f4db /arch/arm
parent0c9f21983490feb5637990d719e729bf77b99bd1 (diff)
ARM: dma-mapping: fix GFP_ATOMIC macro usage
commit 10c8562f932d89c030083e15f9279971ed637136 upstream. GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an atomic allocation, the code must test __GFP_WAIT flag presence. This patch fixes the issue introduced in v3.6-rc5 Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/dma-mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ef3e0f3aac9..6c9d7054d99 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1311,7 +1311,7 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
*handle = DMA_ERROR_CODE;
size = PAGE_ALIGN(size);
- if (gfp & GFP_ATOMIC)
+ if (!(gfp & __GFP_WAIT))
return __iommu_alloc_atomic(dev, size, handle);
pages = __iommu_alloc_buffer(dev, size, gfp, attrs);