aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-06-17 10:45:31 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-06-25 09:39:24 +0200
commite7086eb18119933753fceacfee662307b5e1d1c1 (patch)
tree7cde8c678f2da02dad30cb914efcbcccee483aab /arch/s390/kernel/smp.c
parentc50a160c176aadfbbbeed69a55caf1040b22692e (diff)
downloadlinux-linaro-stable-e7086eb18119933753fceacfee662307b5e1d1c1.tar.gz
s390/smp: fix sigp cpu detection loop
On a (theoretical) system where the read-cpu-info SCLP command does not work but SMT is enabled, the sigp detection loop may not find all configured cores. The maximum CPU address needs to be shifted with smp_cpu_mt_shift. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 0d9d59d4710e..b3f1e9bb5e36 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -658,7 +658,8 @@ static struct sclp_cpu_info *smp_get_cpu_info(void)
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (info && (use_sigp_detection || sclp_get_cpu_info(info))) {
use_sigp_detection = 1;
- for (address = 0; address <= MAX_CPU_ADDRESS;
+ for (address = 0;
+ address <= (MAX_CPU_ADDRESS << smp_cpu_mt_shift);
address += (1U << smp_cpu_mt_shift)) {
if (__pcpu_sigp_relax(address, SIGP_SENSE, 0, NULL) ==
SIGP_CC_NOT_OPERATIONAL)