]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn
authorWei Yang <richard.weiyang@gmail.com>
Sat, 25 May 2024 02:30:38 +0000 (02:30 +0000)
committerMike Rapoport (IBM) <rppt@kernel.org>
Wed, 5 Jun 2024 07:28:10 +0000 (10:28 +0300)
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>
mm/mm_init.c

index f72b852bd5b8e3fda6fe0cc13d67be0492a676cd..2dfb87841fdb65fdf4db8b2b0a1bc153d767fede 100644 (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;