Skip to contentSkip to conversation

x86_64 Early initialization of cpu_to_node

PATCH New Daniel Yeisley 1 participant 1 message Feb 14, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64 Early initialization of cpu_to_node

The early initialization of cpu_to_node code as it is now only updates the cpu_to_node array, and does not update cpu_pda()->nodemember. This will cause numa_node_id() to return 0 on systems where CPU 0 is not on Node 0. This leads to a kernel panic in slab.c.
I've tested the patch below on a 16 processor x86_64 ES7000-600 server, and no longer see the panic I saw with the original 2.6.16-rc3.

---

arch/x86_64/mm/numa.c +1 -1
diff -Naur -p linux-2.6.16-rc3/arch/x86_64/mm/numa.c linux-2.6.16-rc3-a/arch/x86_64/mm/numa.c
@@ -351,7 +351,7 @@ void __init init_cpu_to_node(void)
 			continue;
 		if (apicid_to_node[apicid] == NUMA_NO_NODE)
 			continue;
- 		cpu_to_node[i] = apicid_to_node[apicid];
+		numa_set_node(i,apicid_to_node[apicid]);
 	}
 }