aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2013-05-15 10:53:07 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-05-17 05:47:01 -0400
commita4eeea4e530fee26918529eb1b36ae306095eef5 (patch)
tree1262131d9ea966b683563e4ac4d30b7ab43c7739
parentba54229db65b161d46df449638a1a386444681b0 (diff)
s390/smp: fix cpu re-scan vs. cpu state
The cpu-info array starts with a list of cpus in configured state, followed by the cpus in standby state. The comparison to decide which state a cpu has is incorrect, this causes configured cpus appear as standby cpus. The correct comparison is the index of the new cpu in the cpu-info array vs. the number of configured cpus. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 8074cb4b7cbf..05674b669001 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -645,7 +645,7 @@ static int __cpuinit __smp_rescan_cpus(struct sclp_cpu_info *info,
645 continue; 645 continue;
646 pcpu = pcpu_devices + cpu; 646 pcpu = pcpu_devices + cpu;
647 pcpu->address = info->cpu[i].address; 647 pcpu->address = info->cpu[i].address;
648 pcpu->state = (cpu >= info->configured) ? 648 pcpu->state = (i >= info->configured) ?
649 CPU_STATE_STANDBY : CPU_STATE_CONFIGURED; 649 CPU_STATE_STANDBY : CPU_STATE_CONFIGURED;
650 smp_cpu_set_polarization(cpu, POLARIZATION_UNKNOWN); 650 smp_cpu_set_polarization(cpu, POLARIZATION_UNKNOWN);
651 set_cpu_present(cpu, true); 651 set_cpu_present(cpu, true);