memblock: align freed memory map on pageblock boundaries with SPARSEMEM
authorMike Rapoport <rppt@linux.ibm.com>
Mon, 17 May 2021 18:31:59 +0000 (21:31 +0300)
committerMike Rapoport <rppt@linux.ibm.com>
Wed, 30 Jun 2021 08:38:51 +0000 (11:38 +0300)
commitf921f53e089a12a192808ac4319f28727b35dc0f
treed8f12566c50a3310d3ed71a0f372bcfb76ceff5f
parente2a86800d58639b3acde7eaeb9eb393dca066e08
memblock: align freed memory map on pageblock boundaries with SPARSEMEM

When CONFIG_SPARSEMEM=y the ranges of the memory map that are freed are not
aligned to the pageblock boundaries which breaks assumptions about
homogeneity of the memory map throughout core mm code.

Make sure that the freed memory map is always aligned on pageblock
boundaries regardless of the memory model selection.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Tony Lindgren <tony@atomide.com>
mm/memblock.c