From: Wei Yang Date: Sat, 25 May 2024 02:30:38 +0000 (+0000) Subject: mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3be381d11f872de066774317031ba8edd2d8797e;p=linux.git 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 Link: https://lore.kernel.org/r/20240525023040.13509-1-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (IBM) --- diff --git a/mm/mm_init.c b/mm/mm_init.c index f72b852bd5b8..2dfb87841fdb 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -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;