diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3d974cb2a1a1..635d7dd29d7f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1910,7 +1910,9 @@ static int move_freepages(struct zone *zone, | |||
1910 | * Remove at a later date when no bug reports exist related to | 1910 | * Remove at a later date when no bug reports exist related to |
1911 | * grouping pages by mobility | 1911 | * grouping pages by mobility |
1912 | */ | 1912 | */ |
1913 | VM_BUG_ON(page_zone(start_page) != page_zone(end_page)); | 1913 | VM_BUG_ON(pfn_valid(page_to_pfn(start_page)) && |
1914 | pfn_valid(page_to_pfn(end_page)) && | ||
1915 | page_zone(start_page) != page_zone(end_page)); | ||
1914 | #endif | 1916 | #endif |
1915 | 1917 | ||
1916 | if (num_movable) | 1918 | if (num_movable) |
@@ -5359,14 +5361,9 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, | |||
5359 | /* | 5361 | /* |
5360 | * Skip to the pfn preceding the next valid one (or | 5362 | * Skip to the pfn preceding the next valid one (or |
5361 | * end_pfn), such that we hit a valid pfn (or end_pfn) | 5363 | * end_pfn), such that we hit a valid pfn (or end_pfn) |
5362 | * on our next iteration of the loop. Note that it needs | 5364 | * on our next iteration of the loop. |
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. | ||
5367 | */ | 5365 | */ |
5368 | pfn = (memblock_next_valid_pfn(pfn, end_pfn) & | 5366 | pfn = memblock_next_valid_pfn(pfn, end_pfn) - 1; |
5369 | ~(pageblock_nr_pages-1)) - 1; | ||
5370 | #endif | 5367 | #endif |
5371 | continue; | 5368 | continue; |
5372 | } | 5369 | } |