diff options
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r-- | arch/mips/kernel/smp.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 25472fcaf715..5e189862e523 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> |
@@ -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); |