Thread (8 messages) 8 messages, 1 author, 2d ago

[PATCH 4/7] powerpc/numa: Allow coregroup detection when NUMA is disabled

flat view
WARM2d

From: Srikar Dronamraju <hidden>
Date: 2026-10-16 11:05:43
Also in: lkml
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

parse_numa_properties() currently returns immediately when NUMA is
disabled, which also prevents CPU associativity from being parsed for
coregroup information.

Move the numa_enabled check after CPU associativity processing so that
coregroup topology can still be detected. Keep node onlining conditional
on NUMA being enabled and return before processing memory and PCI NUMA
information when NUMA is disabled.

This allows coregroup topology to be initialized independently of NUMA
node topology.

Signed-off-by: Srikar Dronamraju <redacted>
---
 arch/powerpc/mm/numa.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 7cb37cb0c5db..ffdb07b995a8 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -925,11 +925,6 @@ static int __init parse_numa_properties(void)
 	const __be32 *associativity;
 	unsigned long i;
 
-	if (numa_enabled == 0) {
-		pr_warn("disabled by user\n");
-		return -1;
-	}
-
 	primary_domain_index = find_primary_domain_index();
 
 	if (primary_domain_index < 0) {
@@ -985,10 +980,15 @@ static int __init parse_numa_properties(void)
 		}
 
 		/* node_set_online() is an UB if 'nid' is negative */
-		if (likely(nid >= 0))
+		if (likely(nid >= 0) && numa_enabled)
 			node_set_online(nid);
 	}
 
+	if (numa_enabled == 0) {
+		pr_warn("disabled by user\n");
+		return -1;
+	}
+
 	get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
 
 	for_each_node_by_type(memory, "memory") {
-- 
2.47.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help