diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-17 17:43:12 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-17 17:43:12 +0200 |
commit | 5bb93f1a212e756834bc380682210647b5cdfcf1 (patch) | |
tree | e9628306c2158dc0a62d636e4c7ba981df0978ca /mm | |
parent | Merge branch 'gma500' (Alan's GMA patches) (diff) | |
parent | ARM: dma-mapping: modify condition check while freeing pages (diff) | |
download | linux-5bb93f1a212e756834bc380682210647b5cdfcf1.tar.xz linux-5bb93f1a212e756834bc380682210647b5cdfcf1.zip |
Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull CMA and DMA-mapping fixes from Marek Szyprowski:
"Another set of minor fixups for recently merged Contiguous Memory
Allocator and ARM DMA-mapping changes. Those patches fix mysterious
crashes on systems with CMA and Himem enabled as well as some corner
cases caused by typical off-by-one bug."
* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
ARM: dma-mapping: modify condition check while freeing pages
mm: cma: fix condition check when setting global cma area
mm: cma: don't replace lowmem pages with highmem
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 44030096da63..4a4f9219683f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5635,7 +5635,12 @@ static struct page * __alloc_contig_migrate_alloc(struct page *page, unsigned long private, int **resultp) { - return alloc_page(GFP_HIGHUSER_MOVABLE); + gfp_t gfp_mask = GFP_USER | __GFP_MOVABLE; + + if (PageHighMem(page)) + gfp_mask |= __GFP_HIGHMEM; + + return alloc_page(gfp_mask); } /* [start, end) must belong to a single zone. */ |