aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/setup.c18
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
51static DEFINE_PER_CPU(struct cpu, cpu_devices);
52
51u16 _bfin_swrst; 53u16 _bfin_swrst;
52 54
53unsigned long memory_start, memory_end, physical_mem_end; 55unsigned long memory_start, memory_end, physical_mem_end;
@@ -763,15 +765,15 @@ void __init setup_arch(char **cmdline_p)
763 765
764static int __init topology_init(void) 766static 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
777subsys_initcall(topology_init); 779subsys_initcall(topology_init);