]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm: extend pfn_valid to take into account freed memory map alignment
authorMike Rapoport <rppt@linux.ibm.com>
Mon, 13 Dec 2021 08:57:09 +0000 (16:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Dec 2021 09:12:25 +0000 (10:12 +0100)
commit6026d4032dbbe3d7f4ac2c8daa923fe74dcf41c4
tree98d108e957e983e266d21b8c38102b63e1888805
parent492f4d3cde95aadcd1d070db5dd4796ae8019165
arm: extend pfn_valid to take into account freed memory map alignment

commit a4d5613c4dc6d413e0733e37db9d116a2a36b9f3 upstream.

When unused memory map is freed the preserved part of the memory map is
extended to match pageblock boundaries because lots of core mm
functionality relies on homogeneity of the memory map within pageblock
boundaries.

Since pfn_valid() is used to check whether there is a valid memory map
entry for a PFN, make it return true also for PFNs that have memory map
entries even if there is no actual memory populated there.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/lkml/20210630071211.21011-1-rppt@kernel.org/
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/init.c