Skip to contentSkip to conversation

powerpc/numa: Return the first online node if device tree mapping returns a not online node

RFC PATCH New Aneesh Kumar K.V 1 participant 1 message May 23, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 powerpc/numa: Return the first online node if device tree mapping returns a not online node

numa_setup_cpu can return nodes that are not online. But setup_node_data() only initialize NODE_DATA for only online numa nodes. Hence avoid returning nodes that are not online.

---
 arch/powerpc/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/numa.c +1 -1
index 3becb2588726..80d9be07552c 100644
@@ -742,7 +742,7 @@ static int numa_setup_cpu(unsigned long lcpu)
 	of_node_put(cpu);
 
 out_present:
-	if (nid < 0 || !node_possible(nid))
+	if (nid < 0 || !node_online(nid))
 		nid = first_online_node;
 
 	/*
Signature · 1 line
2.36.1