On Sat, Mar 10, 2018 at 2:07 AM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > Hmm. I've already applied Andrew's set. > > Can the people involved please check the current upstream tree, and > make sure it's either ok, or send in the proper fixes.. As simple as this: ~~~~ neelx@metal:~/nX/src/linux$ git diff diff --git a/mm/memblock.c b/mm/memblock.c index b6ba6b7adadc..2a5facd236bb 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1101,8 +1101,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, *out_nid = r->nid; } -unsigned long __init_memblock memblock_next_valid_pfn(unsigned long pfn, - unsigned long max_pfn) +unsigned long __init_memblock memblock_next_valid_pfn(unsigned long pfn) { struct memblock_type *type = &memblock.memory; unsigned int right = type->cnt; diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3d974cb2a1a1..efb290268479 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5365,7 +5365,7 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, * the valid region but still depends on correct page * metadata. */ - pfn = (memblock_next_valid_pfn(pfn, end_pfn) & + pfn = (memblock_next_valid_pfn(pfn) & ~(pageblock_nr_pages-1)) - 1; #endif continue; ~~~~ This is what I've originally sent. The argument is unused now. --nX > > Linus > > On Fri, Mar 9, 2018 at 5:02 PM, Daniel Vacek <neelx@xxxxxxxxxx> wrote: >> Again, end_pfn should be gone.