aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 5856b3fda6b..e10f4ca0049 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -263,7 +263,7 @@ static void do_machine_restart(void * __unused)
263 int cpu; 263 int cpu;
264 static atomic_t cpuid = ATOMIC_INIT(-1); 264 static atomic_t cpuid = ATOMIC_INIT(-1);
265 265
266 if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid)) 266 if (atomic_cmpxchg(&cpuid, -1, smp_processor_id()) != -1)
267 signal_processor(smp_processor_id(), sigp_stop); 267 signal_processor(smp_processor_id(), sigp_stop);
268 268
269 /* Wait for all other cpus to enter stopped state */ 269 /* Wait for all other cpus to enter stopped state */
@@ -313,7 +313,7 @@ static void do_machine_halt(void * __unused)
313{ 313{
314 static atomic_t cpuid = ATOMIC_INIT(-1); 314 static atomic_t cpuid = ATOMIC_INIT(-1);
315 315
316 if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid) == 0) { 316 if (atomic_cmpxchg(&cpuid, -1, smp_processor_id()) == -1) {
317 smp_send_stop(); 317 smp_send_stop();
318 if (MACHINE_IS_VM && strlen(vmhalt_cmd) > 0) 318 if (MACHINE_IS_VM && strlen(vmhalt_cmd) > 0)
319 cpcmd(vmhalt_cmd, NULL, 0, NULL); 319 cpcmd(vmhalt_cmd, NULL, 0, NULL);
@@ -332,7 +332,7 @@ static void do_machine_power_off(void * __unused)
332{ 332{
333 static atomic_t cpuid = ATOMIC_INIT(-1); 333 static atomic_t cpuid = ATOMIC_INIT(-1);
334 334
335 if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid) == 0) { 335 if (atomic_cmpxchg(&cpuid, -1, smp_processor_id()) == -1) {
336 smp_send_stop(); 336 smp_send_stop();
337 if (MACHINE_IS_VM && strlen(vmpoff_cmd) > 0) 337 if (MACHINE_IS_VM && strlen(vmpoff_cmd) > 0)
338 cpcmd(vmpoff_cmd, NULL, 0, NULL); 338 cpcmd(vmpoff_cmd, NULL, 0, NULL);
@@ -402,7 +402,7 @@ static void smp_ext_bitcall_others(ec_bit_sig sig)
402 } 402 }
403} 403}
404 404
405#ifndef CONFIG_ARCH_S390X 405#ifndef CONFIG_64BIT
406/* 406/*
407 * this function sends a 'purge tlb' signal to another CPU. 407 * this function sends a 'purge tlb' signal to another CPU.
408 */ 408 */
@@ -416,7 +416,7 @@ void smp_ptlb_all(void)
416 on_each_cpu(smp_ptlb_callback, NULL, 0, 1); 416 on_each_cpu(smp_ptlb_callback, NULL, 0, 1);
417} 417}
418EXPORT_SYMBOL(smp_ptlb_all); 418EXPORT_SYMBOL(smp_ptlb_all);
419#endif /* ! CONFIG_ARCH_S390X */ 419#endif /* ! CONFIG_64BIT */
420 420
421/* 421/*
422 * this function sends a 'reschedule' IPI to another CPU. 422 * this function sends a 'reschedule' IPI to another CPU.
@@ -783,7 +783,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
783 if (stack == 0ULL) 783 if (stack == 0ULL)
784 panic("smp_boot_cpus failed to allocate memory\n"); 784 panic("smp_boot_cpus failed to allocate memory\n");
785 lowcore_ptr[i]->panic_stack = stack + (PAGE_SIZE); 785 lowcore_ptr[i]->panic_stack = stack + (PAGE_SIZE);
786#ifndef __s390x__ 786#ifndef CONFIG_64BIT
787 if (MACHINE_HAS_IEEE) { 787 if (MACHINE_HAS_IEEE) {
788 lowcore_ptr[i]->extended_save_area_addr = 788 lowcore_ptr[i]->extended_save_area_addr =
789 (__u32) __get_free_pages(GFP_KERNEL,0); 789 (__u32) __get_free_pages(GFP_KERNEL,0);
@@ -793,7 +793,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
793 } 793 }
794#endif 794#endif
795 } 795 }
796#ifndef __s390x__ 796#ifndef CONFIG_64BIT
797 if (MACHINE_HAS_IEEE) 797 if (MACHINE_HAS_IEEE)
798 ctl_set_bit(14, 29); /* enable extended save area */ 798 ctl_set_bit(14, 29); /* enable extended save area */
799#endif 799#endif