diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2013-01-16 09:41:02 -0500 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2013-02-25 09:30:43 -0500 |
commit | f8669bef11fadfe811a5d7d59cb327499edac088 (patch) | |
tree | cbb8847bbdc46153e70e635644ac0346d6beec11 /arch/arm/mm | |
parent | 9848e48f4c316ccb64d6f29ff0ed85f11d7bf532 (diff) |
ARM: dma-mapping: use himem for DMA buffers for IOMMU-mapped devices
IOMMU can provide access to any memory page, so there is no point in
limiting the allocated pages only to lowmem, once other parts of
dma-mapping subsystem correctly supports himem pages.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 94d7359074c2..2163af4b31b8 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -1095,12 +1095,17 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size, | |||
1095 | return pages; | 1095 | return pages; |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | /* | ||
1099 | * IOMMU can map any pages, so himem can also be used here | ||
1100 | */ | ||
1101 | gfp |= __GFP_NOWARN | __GFP_HIGHMEM; | ||
1102 | |||
1098 | while (count) { | 1103 | while (count) { |
1099 | int j, order = __fls(count); | 1104 | int j, order = __fls(count); |
1100 | 1105 | ||
1101 | pages[i] = alloc_pages(gfp | __GFP_NOWARN, order); | 1106 | pages[i] = alloc_pages(gfp, order); |
1102 | while (!pages[i] && order) | 1107 | while (!pages[i] && order) |
1103 | pages[i] = alloc_pages(gfp | __GFP_NOWARN, --order); | 1108 | pages[i] = alloc_pages(gfp, --order); |
1104 | if (!pages[i]) | 1109 | if (!pages[i]) |
1105 | goto error; | 1110 | goto error; |
1106 | 1111 | ||