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>
This commit is contained in:
parent
9848e48f4c
commit
f8669bef11
1 changed files with 7 additions and 2 deletions
|
@ -1095,12 +1095,17 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size,
|
||||||
return pages;
|
return pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IOMMU can map any pages, so himem can also be used here
|
||||||
|
*/
|
||||||
|
gfp |= __GFP_NOWARN | __GFP_HIGHMEM;
|
||||||
|
|
||||||
while (count) {
|
while (count) {
|
||||||
int j, order = __fls(count);
|
int j, order = __fls(count);
|
||||||
|
|
||||||
pages[i] = alloc_pages(gfp | __GFP_NOWARN, order);
|
pages[i] = alloc_pages(gfp, order);
|
||||||
while (!pages[i] && order)
|
while (!pages[i] && order)
|
||||||
pages[i] = alloc_pages(gfp | __GFP_NOWARN, --order);
|
pages[i] = alloc_pages(gfp, --order);
|
||||||
if (!pages[i])
|
if (!pages[i])
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue