diff options
-rw-r--r-- | arch/mips/kernel/smp.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 221895802dca..1af3612a1ce8 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -467,14 +467,18 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
467 | 467 | ||
468 | static int __init topology_init(void) | 468 | static int __init topology_init(void) |
469 | { | 469 | { |
470 | int cpu; | 470 | int i, ret; |
471 | int ret; | ||
472 | 471 | ||
473 | for_each_present_cpu(cpu) { | 472 | #ifdef CONFIG_NUMA |
474 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu); | 473 | for_each_online_node(i) |
474 | register_one_node(i); | ||
475 | #endif /* CONFIG_NUMA */ | ||
476 | |||
477 | for_each_present_cpu(i) { | ||
478 | ret = register_cpu(&per_cpu(cpu_devices, i), i); | ||
475 | if (ret) | 479 | if (ret) |
476 | printk(KERN_WARNING "topology_init: register_cpu %d " | 480 | printk(KERN_WARNING "topology_init: register_cpu %d " |
477 | "failed (%d)\n", cpu, ret); | 481 | "failed (%d)\n", i, ret); |
478 | } | 482 | } |
479 | 483 | ||
480 | return 0; | 484 | return 0; |