diff options
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
| -rw-r--r-- | arch/blackfin/kernel/setup.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 2f156bfc2b2c..aca5e6e5bbdd 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
| @@ -48,6 +48,8 @@ | |||
| 48 | #include <asm/fixed_code.h> | 48 | #include <asm/fixed_code.h> |
| 49 | #include <asm/early_printk.h> | 49 | #include <asm/early_printk.h> |
| 50 | 50 | ||
| 51 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
| 52 | |||
| 51 | u16 _bfin_swrst; | 53 | u16 _bfin_swrst; |
| 52 | 54 | ||
| 53 | unsigned long memory_start, memory_end, physical_mem_end; | 55 | unsigned long memory_start, memory_end, physical_mem_end; |
| @@ -763,15 +765,15 @@ void __init setup_arch(char **cmdline_p) | |||
| 763 | 765 | ||
| 764 | static int __init topology_init(void) | 766 | static int __init topology_init(void) |
| 765 | { | 767 | { |
| 766 | #if defined (CONFIG_BF561) | 768 | int cpu; |
| 767 | static struct cpu cpu[2]; | 769 | |
| 768 | register_cpu(&cpu[0], 0); | 770 | for_each_possible_cpu(cpu) { |
| 769 | register_cpu(&cpu[1], 1); | 771 | struct cpu *c = &per_cpu(cpu_devices, cpu); |
| 772 | |||
| 773 | register_cpu(c, cpu); | ||
| 774 | } | ||
| 775 | |||
| 770 | return 0; | 776 | return 0; |
| 771 | #else | ||
| 772 | static struct cpu cpu[1]; | ||
| 773 | return register_cpu(cpu, 0); | ||
| 774 | #endif | ||
| 775 | } | 777 | } |
| 776 | 778 | ||
| 777 | subsys_initcall(topology_init); | 779 | subsys_initcall(topology_init); |
