aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index cb416723538f..3d974cb2a1a1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5359,9 +5359,14 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
5359 /* 5359 /*
5360 * Skip to the pfn preceding the next valid one (or 5360 * Skip to the pfn preceding the next valid one (or
5361 * end_pfn), such that we hit a valid pfn (or end_pfn) 5361 * end_pfn), such that we hit a valid pfn (or end_pfn)
5362 * on our next iteration of the loop. 5362 * on our next iteration of the loop. Note that it needs
5363 * to be pageblock aligned even when the region itself
5364 * is not. move_freepages_block() can shift ahead of
5365 * the valid region but still depends on correct page
5366 * metadata.
5363 */ 5367 */
5364 pfn = memblock_next_valid_pfn(pfn, end_pfn) - 1; 5368 pfn = (memblock_next_valid_pfn(pfn, end_pfn) &
5369 ~(pageblock_nr_pages-1)) - 1;
5365#endif 5370#endif
5366 continue; 5371 continue;
5367 } 5372 }