Skip to content

Commit

Permalink
[MIPS] NUMA: Register all nodes before cpus or sysfs will barf.
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Oct 9, 2006
1 parent 1896551 commit 0e8f8f5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,18 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);

static int __init topology_init(void)
{
int cpu;
int ret;
int i, ret;

for_each_present_cpu(cpu) {
ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu);
#ifdef CONFIG_NUMA
for_each_online_node(i)
register_one_node(i);
#endif /* CONFIG_NUMA */

for_each_present_cpu(i) {
ret = register_cpu(&per_cpu(cpu_devices, i), i);
if (ret)
printk(KERN_WARNING "topology_init: register_cpu %d "
"failed (%d)\n", cpu, ret);
"failed (%d)\n", i, ret);
}

return 0;
Expand Down

0 comments on commit 0e8f8f5

Please sign in to comment.