mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn

Just like what it does in "if (mirrored_kernelcore)", we should use
memblock_region_memory_base_pfn() to get the startpfn.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Link: https://lore.kernel.org/r/20240525023040.13509-1-richard.weiyang@gmail.com
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
This commit is contained in:
Wei Yang 2024-05-25 02:30:38 +00:00 committed by Mike Rapoport (IBM)
parent b73f6b98bb
commit 3be381d11f
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)
nid = memblock_get_region_node(r);
usable_startpfn = PFN_DOWN(r->base);
usable_startpfn = memblock_region_memory_base_pfn(r);
zone_movable_pfn[nid] = zone_movable_pfn[nid] ?
min(usable_startpfn, zone_movable_pfn[nid]) :
usable_startpfn;