summaryrefslogtreecommitdiffstats
path: root/mm/mm_init.c
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-05-25 04:30:38 +0200
committerMike Rapoport (IBM) <rppt@kernel.org>2024-06-05 09:28:10 +0200
commit3be381d11f872de066774317031ba8edd2d8797e (patch)
tree021ee45871e35a5161aa714857ce3fa4381b0780 /mm/mm_init.c
parentmm/memblock: use PAGE_ALIGN_DOWN to get pgend in free_memmap (diff)
downloadlinux-3be381d11f872de066774317031ba8edd2d8797e.tar.xz
linux-3be381d11f872de066774317031ba8edd2d8797e.zip
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>
Diffstat (limited to 'mm/mm_init.c')
-rw-r--r--mm/mm_init.c2
1 files changed, 1 insertions, 1 deletions
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;