Commit 2e0e3f8a authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Really fix empty node 0 on x86-64

x86-64 shares some numa code with i386, and that didn't handle holes in
the node map properly.  Fix this.
parent be6a14aa
......@@ -41,8 +41,10 @@ static int __init topology_init(void)
{
int i;
for (i = 0; i < num_online_nodes(); i++)
arch_register_node(i);
for (i = 0; i < MAX_NUMNODES; i++) {
if (node_online(i))
arch_register_node(i);
}
for (i = 0; i < NR_CPUS; i++)
if (cpu_possible(i)) arch_register_cpu(i);
return 0;
......
......@@ -18,10 +18,8 @@ static inline int arch_register_cpu(int num){
#ifdef CONFIG_NUMA
int node = cpu_to_node(num);
if (!node_online(node))
return 0;
parent = &node_devices[node].node;
if (node_online(node))
parent = &node_devices[node].node;
#endif /* CONFIG_NUMA */
return register_cpu(&cpu_devices[num].cpu, num, parent);
......
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