diff options
Diffstat (limited to 'arch/mips/pmc-sierra/yosemite/smp.c')
-rw-r--r-- | arch/mips/pmc-sierra/yosemite/smp.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c index 7f8fda962190..c197311e15d3 100644 --- a/arch/mips/pmc-sierra/yosemite/smp.c +++ b/arch/mips/pmc-sierra/yosemite/smp.c | |||
@@ -50,37 +50,25 @@ void __init prom_grab_secondary(void) | |||
50 | * We don't want to start the secondary CPU yet nor do we have a nice probing | 50 | * We don't want to start the secondary CPU yet nor do we have a nice probing |
51 | * feature in PMON so we just assume presence of the secondary core. | 51 | * feature in PMON so we just assume presence of the secondary core. |
52 | */ | 52 | */ |
53 | static char maxcpus_string[] __initdata = | 53 | void __init plat_smp_setup(void) |
54 | KERN_WARNING "max_cpus set to 0; using 1 instead\n"; | ||
55 | |||
56 | void __init prom_prepare_cpus(unsigned int max_cpus) | ||
57 | { | 54 | { |
58 | int enabled = 0, i; | 55 | int i; |
59 | |||
60 | if (max_cpus == 0) { | ||
61 | printk(maxcpus_string); | ||
62 | max_cpus = 1; | ||
63 | } | ||
64 | 56 | ||
65 | cpus_clear(phys_cpu_present_map); | 57 | cpus_clear(phys_cpu_present_map); |
66 | 58 | ||
67 | for (i = 0; i < 2; i++) { | 59 | for (i = 0; i < 2; i++) { |
68 | if (i == max_cpus) | ||
69 | break; | ||
70 | |||
71 | /* | ||
72 | * The boot CPU | ||
73 | */ | ||
74 | cpu_set(i, phys_cpu_present_map); | 60 | cpu_set(i, phys_cpu_present_map); |
75 | __cpu_number_map[i] = i; | 61 | __cpu_number_map[i] = i; |
76 | __cpu_logical_map[i] = i; | 62 | __cpu_logical_map[i] = i; |
77 | enabled++; | ||
78 | } | 63 | } |
64 | } | ||
79 | 65 | ||
66 | void __init plat_prepare_cpus(unsigned int max_cpus) | ||
67 | { | ||
80 | /* | 68 | /* |
81 | * Be paranoid. Enable the IPI only if we're really about to go SMP. | 69 | * Be paranoid. Enable the IPI only if we're really about to go SMP. |
82 | */ | 70 | */ |
83 | if (enabled > 1) | 71 | if (cpus_weight(cpu_possible_map)) |
84 | set_c0_status(STATUSF_IP5); | 72 | set_c0_status(STATUSF_IP5); |
85 | } | 73 | } |
86 | 74 | ||