From: Aneesh Kumar K.V Date: Mon, 4 Jul 2022 06:38:51 +0000 (+0530) Subject: powerpc/mm: Always update max/min_low_pfn in mem_topology_setup() X-Git-Tag: v5.10.228~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25e86fb0aeecf9485bd3a72d84637df015d6838f;p=thirdparty%2Fkernel%2Fstable.git powerpc/mm: Always update max/min_low_pfn in mem_topology_setup() commit 7b31f7dadd7074fa70bb14a53bd286ffdfc98b04 upstream. For both CONFIG_NUMA enabled/disabled use mem_topology_setup() to update max/min_low_pfn. This also adds min_low_pfn update to CONFIG_NUMA which was initialized to zero before. (mpe: Though MEMORY_START is == 0 for PPC64=y which is all possible NUMA=y systems) Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220704063851.295482-1-aneesh.kumar@linux.ibm.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index ce8569e16f0c4..96b3e31ee0f3d 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1177,6 +1177,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 @@ -1221,9 +1224,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) {