aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pseries/smp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 8979982eb2ee..3b1bf61c45be 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -55,7 +55,7 @@
55 * The Primary thread of each non-boot processor was started from the OF client 55 * The Primary thread of each non-boot processor was started from the OF client
56 * interface by prom_hold_cpus and is spinning on secondary_hold_spinloop. 56 * interface by prom_hold_cpus and is spinning on secondary_hold_spinloop.
57 */ 57 */
58static cpumask_t of_spin_map; 58static cpumask_var_t of_spin_mask;
59 59
60/* Query where a cpu is now. Return codes #defined in plpar_wrappers.h */ 60/* Query where a cpu is now. Return codes #defined in plpar_wrappers.h */
61int smp_query_cpu_stopped(unsigned int pcpu) 61int smp_query_cpu_stopped(unsigned int pcpu)
@@ -98,7 +98,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
98 unsigned int pcpu; 98 unsigned int pcpu;
99 int start_cpu; 99 int start_cpu;
100 100
101 if (cpu_isset(lcpu, of_spin_map)) 101 if (cpumask_test_cpu(lcpu, of_spin_mask))
102 /* Already started by OF and sitting in spin loop */ 102 /* Already started by OF and sitting in spin loop */
103 return 1; 103 return 1;
104 104
@@ -106,7 +106,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
106 106
107 /* Check to see if the CPU out of FW already for kexec */ 107 /* Check to see if the CPU out of FW already for kexec */
108 if (smp_query_cpu_stopped(pcpu) == QCSS_NOT_STOPPED){ 108 if (smp_query_cpu_stopped(pcpu) == QCSS_NOT_STOPPED){
109 cpu_set(lcpu, of_spin_map); 109 cpumask_set_cpu(lcpu, of_spin_mask);
110 return 1; 110 return 1;
111 } 111 }
112 112
@@ -143,7 +143,7 @@ static void __devinit smp_xics_setup_cpu(int cpu)
143 if (firmware_has_feature(FW_FEATURE_SPLPAR)) 143 if (firmware_has_feature(FW_FEATURE_SPLPAR))
144 vpa_init(cpu); 144 vpa_init(cpu);
145 145
146 cpu_clear(cpu, of_spin_map); 146 cpumask_clear_cpu(cpu, of_spin_mask);
147 set_cpu_current_state(cpu, CPU_STATE_ONLINE); 147 set_cpu_current_state(cpu, CPU_STATE_ONLINE);
148 set_default_offline_state(cpu); 148 set_default_offline_state(cpu);
149 149
@@ -214,17 +214,19 @@ static void __init smp_init_pseries(void)
214 214
215 pr_debug(" -> smp_init_pSeries()\n"); 215 pr_debug(" -> smp_init_pSeries()\n");
216 216
217 alloc_bootmem_cpumask_var(&of_spin_mask);
218
217 /* Mark threads which are still spinning in hold loops. */ 219 /* Mark threads which are still spinning in hold loops. */
218 if (cpu_has_feature(CPU_FTR_SMT)) { 220 if (cpu_has_feature(CPU_FTR_SMT)) {
219 for_each_present_cpu(i) { 221 for_each_present_cpu(i) {
220 if (cpu_thread_in_core(i) == 0) 222 if (cpu_thread_in_core(i) == 0)
221 cpu_set(i, of_spin_map); 223 cpumask_set_cpu(i, of_spin_mask);
222 } 224 }
223 } else { 225 } else {
224 of_spin_map = cpu_present_map; 226 cpumask_copy(of_spin_mask, cpu_present_mask);
225 } 227 }
226 228
227 cpu_clear(boot_cpuid, of_spin_map); 229 cpumask_clear_cpu(boot_cpuid, of_spin_mask);
228 230
229 /* Non-lpar has additional take/give timebase */ 231 /* Non-lpar has additional take/give timebase */
230 if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { 232 if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) {