Skip to contentSkip to conversation

powerpc/mm: Update max/min_low_pfn in the same function

PATCH Applied Aneesh Kumar K.V 2 participants 2 messages Jul 4, 2022 – Oct 4, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc/mm: Update max/min_low_pfn in the same function

For both CONFIG_NUMA enabled/disabled use mem_topology_setup to update max/min_low_pfn.

This also add min_low_pfn update to CONFIG_NUMA which was initialized to zero before.

---
 arch/powerpc/mm/numa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/mm/numa.c +3 -3
index 0801b2ce9b7d..b44ce71917d7 100644
@@ -1160,6 +1160,9 @@ void __init mem_topology_setup(void)
 {
 	int cpu;
 
+	max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
+	min_low_pfn = MEMORY_START >> PAGE_SHIFT;
+
 	/*
 	 * Linux/mm assumes node 0 to be online at boot. However this is not
 	 * true on PowerPC, where node 0 is similar to any other node, it
@@ -1204,9 +1207,6 @@ void __init initmem_init(void)
 {
 	int nid;
 
-	max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
-	max_pfn = max_low_pfn;
-
 	memblock_dump_all();
 
 	for_each_online_node(nid) {
Signature · 1 line
2.36.1