Skip to content

Commit

Permalink
[S390] smp: fix cpu_possible_map initialization
Browse files Browse the repository at this point in the history
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 def6cfb
"[S390] cpumask: Use accessors code."

Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Apr 14, 2009
1 parent 52db45c commit 88e0128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
init_cpu_possible(cpumask_of(0));
for (cpu = 1; cpu < pcpus && cpu < nr_cpu_ids; cpu++)
set_cpu_possible(cpu, true);
return 0;
}
Expand Down

0 comments on commit 88e0128

Please sign in to comment.