Skip to content

Commit

Permalink
powerpc/mm: Always update max/min_low_pfn in mem_topology_setup()
Browse files Browse the repository at this point in the history
commit 7b31f7d 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 <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kvaneesh authored and gregkh committed Oct 22, 2024
1 parent edf8146 commit eb817fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,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
Expand Down Expand Up @@ -1206,9 +1209,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) {
Expand Down

0 comments on commit eb817fe

Please sign in to comment.