mem-hotplug: let memblock skip the hotpluggable memory regions in __next_mem_range()

Let memblock skip the hotpluggable memory regions in __next_mem_range(),
it is used to to prevent memblock from allocating hotpluggable memory
for the kernel at early time. The code is the same as __next_mem_range_rev().

Clear hotpluggable flag before releasing free pages to the buddy
allocator.  If we don't clear hotpluggable flag in
free_low_memory_core_early(), the memory which marked hotpluggable flag
will not free to buddy allocator.  Because __next_mem_range() will skip


[ fix warning]
Signed-off-by: Xishi Qiu <>
Cc: Tejun Heo <>
Cc: Tang Chen <>
Cc: Zhang Yanfei <>
Cc: Wen Congyang <>
Cc: "Rafael J. Wysocki" <>
Cc: "H. Peter Anvin" <>
Cc: Wu Fengguang <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
2 files changed