Commit 7b31f7da authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/mm: Always update max/min_low_pfn in mem_topology_setup()

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: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220704063851.295482-1-aneesh.kumar@linux.ibm.com
parent d368e0c4
...@@ -1160,6 +1160,9 @@ void __init mem_topology_setup(void) ...@@ -1160,6 +1160,9 @@ void __init mem_topology_setup(void)
{ {
int cpu; 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 * 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 * true on PowerPC, where node 0 is similar to any other node, it
...@@ -1204,9 +1207,6 @@ void __init initmem_init(void) ...@@ -1204,9 +1207,6 @@ void __init initmem_init(void)
{ {
int nid; int nid;
max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
max_pfn = max_low_pfn;
memblock_dump_all(); memblock_dump_all();
for_each_online_node(nid) { for_each_online_node(nid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment