diff options
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r-- | arch/mips/kernel/smp.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 25472fcaf715..06ed90752424 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/cpumask.h> | 31 | #include <linux/cpumask.h> |
32 | #include <linux/cpu.h> | ||
32 | 33 | ||
33 | #include <asm/atomic.h> | 34 | #include <asm/atomic.h> |
34 | #include <asm/cpu.h> | 35 | #include <asm/cpu.h> |
@@ -235,7 +236,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
235 | init_new_context(current, &init_mm); | 236 | init_new_context(current, &init_mm); |
236 | current_thread_info()->cpu = 0; | 237 | current_thread_info()->cpu = 0; |
237 | smp_tune_scheduling(); | 238 | smp_tune_scheduling(); |
238 | prom_prepare_cpus(max_cpus); | 239 | plat_prepare_cpus(max_cpus); |
239 | } | 240 | } |
240 | 241 | ||
241 | /* preload SMP state for boot cpu */ | 242 | /* preload SMP state for boot cpu */ |
@@ -424,6 +425,25 @@ void flush_tlb_one(unsigned long vaddr) | |||
424 | local_flush_tlb_one(vaddr); | 425 | local_flush_tlb_one(vaddr); |
425 | } | 426 | } |
426 | 427 | ||
428 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
429 | |||
430 | static int __init topology_init(void) | ||
431 | { | ||
432 | int cpu; | ||
433 | int ret; | ||
434 | |||
435 | for_each_cpu(cpu) { | ||
436 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); | ||
437 | if (ret) | ||
438 | printk(KERN_WARNING "topology_init: register_cpu %d " | ||
439 | "failed (%d)\n", cpu, ret); | ||
440 | } | ||
441 | |||
442 | return 0; | ||
443 | } | ||
444 | |||
445 | subsys_initcall(topology_init); | ||
446 | |||
427 | EXPORT_SYMBOL(flush_tlb_page); | 447 | EXPORT_SYMBOL(flush_tlb_page); |
428 | EXPORT_SYMBOL(flush_tlb_one); | 448 | EXPORT_SYMBOL(flush_tlb_one); |
429 | EXPORT_SYMBOL(cpu_data); | 449 | EXPORT_SYMBOL(cpu_data); |