aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2011-05-23 04:24:36 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-05-23 04:24:31 -0400
commit0f1959f50646612b247d624bdbf8b0c8816f2a93 (patch)
tree450c9765dc1fef51a35c1a389cdf26ed5ed89ee1 /arch/s390/kernel/smp.c
parent7dd8fe1f910f9644167ef91ddab44107d0d668c5 (diff)
[S390] convert old cpumask API into new one
Adapt new API. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 2310f07aaadb..fed71dcaa0d6 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -335,7 +335,7 @@ static int smp_rescan_cpus_sigp(cpumask_t avail)
335 smp_cpu_polarization[logical_cpu] = POLARIZATION_UNKNWN; 335 smp_cpu_polarization[logical_cpu] = POLARIZATION_UNKNWN;
336 if (!cpu_stopped(logical_cpu)) 336 if (!cpu_stopped(logical_cpu))
337 continue; 337 continue;
338 cpu_set(logical_cpu, cpu_present_map); 338 set_cpu_present(logical_cpu, true);
339 smp_cpu_state[logical_cpu] = CPU_STATE_CONFIGURED; 339 smp_cpu_state[logical_cpu] = CPU_STATE_CONFIGURED;
340 logical_cpu = cpumask_next(logical_cpu, &avail); 340 logical_cpu = cpumask_next(logical_cpu, &avail);
341 if (logical_cpu >= nr_cpu_ids) 341 if (logical_cpu >= nr_cpu_ids)
@@ -367,7 +367,7 @@ static int smp_rescan_cpus_sclp(cpumask_t avail)
367 continue; 367 continue;
368 __cpu_logical_map[logical_cpu] = cpu_id; 368 __cpu_logical_map[logical_cpu] = cpu_id;
369 smp_cpu_polarization[logical_cpu] = POLARIZATION_UNKNWN; 369 smp_cpu_polarization[logical_cpu] = POLARIZATION_UNKNWN;
370 cpu_set(logical_cpu, cpu_present_map); 370 set_cpu_present(logical_cpu, true);
371 if (cpu >= info->configured) 371 if (cpu >= info->configured)
372 smp_cpu_state[logical_cpu] = CPU_STATE_STANDBY; 372 smp_cpu_state[logical_cpu] = CPU_STATE_STANDBY;
373 else 373 else
@@ -385,7 +385,7 @@ static int __smp_rescan_cpus(void)
385{ 385{
386 cpumask_t avail; 386 cpumask_t avail;
387 387
388 cpus_xor(avail, cpu_possible_map, cpu_present_map); 388 cpumask_xor(&avail, cpu_possible_mask, cpu_present_mask);
389 if (smp_use_sigp_detection) 389 if (smp_use_sigp_detection)
390 return smp_rescan_cpus_sigp(avail); 390 return smp_rescan_cpus_sigp(avail);
391 else 391 else
@@ -467,7 +467,7 @@ int __cpuinit start_secondary(void *cpuvoid)
467 notify_cpu_starting(smp_processor_id()); 467 notify_cpu_starting(smp_processor_id());
468 /* Mark this cpu as online */ 468 /* Mark this cpu as online */
469 ipi_call_lock(); 469 ipi_call_lock();
470 cpu_set(smp_processor_id(), cpu_online_map); 470 set_cpu_online(smp_processor_id(), true);
471 ipi_call_unlock(); 471 ipi_call_unlock();
472 /* Switch on interrupts */ 472 /* Switch on interrupts */
473 local_irq_enable(); 473 local_irq_enable();
@@ -644,7 +644,7 @@ int __cpu_disable(void)
644 struct ec_creg_mask_parms cr_parms; 644 struct ec_creg_mask_parms cr_parms;
645 int cpu = smp_processor_id(); 645 int cpu = smp_processor_id();
646 646
647 cpu_clear(cpu, cpu_online_map); 647 set_cpu_online(cpu, false);
648 648
649 /* Disable pfault pseudo page faults on this cpu. */ 649 /* Disable pfault pseudo page faults on this cpu. */
650 pfault_fini(); 650 pfault_fini();
@@ -738,8 +738,8 @@ void __init smp_prepare_boot_cpu(void)
738 BUG_ON(smp_processor_id() != 0); 738 BUG_ON(smp_processor_id() != 0);
739 739
740 current_thread_info()->cpu = 0; 740 current_thread_info()->cpu = 0;
741 cpu_set(0, cpu_present_map); 741 set_cpu_present(0, true);
742 cpu_set(0, cpu_online_map); 742 set_cpu_online(0, true);
743 S390_lowcore.percpu_offset = __per_cpu_offset[0]; 743 S390_lowcore.percpu_offset = __per_cpu_offset[0];
744 current_set[0] = current; 744 current_set[0] = current;
745 smp_cpu_state[0] = CPU_STATE_CONFIGURED; 745 smp_cpu_state[0] = CPU_STATE_CONFIGURED;
@@ -1016,21 +1016,21 @@ int __ref smp_rescan_cpus(void)
1016 1016
1017 get_online_cpus(); 1017 get_online_cpus();
1018 mutex_lock(&smp_cpu_state_mutex); 1018 mutex_lock(&smp_cpu_state_mutex);
1019 newcpus = cpu_present_map; 1019 cpumask_copy(&newcpus, cpu_present_mask);
1020 rc = __smp_rescan_cpus(); 1020 rc = __smp_rescan_cpus();
1021 if (rc) 1021 if (rc)
1022 goto out; 1022 goto out;
1023 cpus_andnot(newcpus, cpu_present_map, newcpus); 1023 cpumask_andnot(&newcpus, cpu_present_mask, &newcpus);
1024 for_each_cpu_mask(cpu, newcpus) { 1024 for_each_cpu(cpu, &newcpus) {
1025 rc = smp_add_present_cpu(cpu); 1025 rc = smp_add_present_cpu(cpu);
1026 if (rc) 1026 if (rc)
1027 cpu_clear(cpu, cpu_present_map); 1027 set_cpu_present(cpu, false);
1028 } 1028 }
1029 rc = 0; 1029 rc = 0;
1030out: 1030out:
1031 mutex_unlock(&smp_cpu_state_mutex); 1031 mutex_unlock(&smp_cpu_state_mutex);
1032 put_online_cpus(); 1032 put_online_cpus();
1033 if (!cpus_empty(newcpus)) 1033 if (!cpumask_empty(&newcpus))
1034 topology_schedule_update(); 1034 topology_schedule_update();
1035 return rc; 1035 return rc;
1036} 1036}