Commit 88e01285 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

[S390] smp: fix cpu_possible_map initialization

The cpu_possible_map by default is initialized with all ones in s390.
If the kernel paramert possible_cpus=<x> is passed the cpu_possible_map
is supposed to have x bits set.
However the current code just sets the x bits without clearing the NR_CPUS
bits that were already set. So we end up with an unchanged map that has
all bits set.
To fix this just clear the map before setting any new bits.

This broke with def6cfb7

"[S390] cpumask: Use accessors code."

Cc: Rusty Russell <>
Signed-off-by: default avatarHeiko Carstens <>
Signed-off-by: default avatarMartin Schwidefsky <>
parent 52db45c3
......@@ -591,7 +591,8 @@ static int __init setup_possible_cpus(char *s)
int pcpus, cpu;
pcpus = simple_strtoul(s, NULL, 0);
for (cpu = 0; cpu < pcpus && cpu < nr_cpu_ids; cpu++)
for (cpu = 1; cpu < pcpus && cpu < nr_cpu_ids; cpu++)
set_cpu_possible(cpu, true);
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment