linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Patch v3 1/3] mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn
@ 2024-05-25  2:30 Wei Yang
  2024-05-25  2:30 ` [Patch v3 2/3] mm/memblock: fix a typo of for_each_mem_region() Wei Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wei Yang @ 2024-05-25  2:30 UTC (permalink / raw)
  To: rppt, akpm; +Cc: linux-mm, Wei Yang

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>
---
v3: separate a typo fix to a new patch
---
 mm/mm_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.34.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-25 15:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-25  2:30 [Patch v3 1/3] mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn Wei Yang
2024-05-25  2:30 ` [Patch v3 2/3] mm/memblock: fix a typo of for_each_mem_region() Wei Yang
2024-05-25  2:30 ` [Patch v3 3/3] mm/mm_init.c: move nr_initialised reset down a bit Wei Yang
2024-05-25 15:36 ` [Patch v3 1/3] mm/mm_init.c: use memblock_region_memory_base_pfn() to get startpfn Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox