From: Heiko Carstens Date: Tue, 14 Apr 2009 13:36:25 +0000 (+0200) Subject: [S390] smp: fix cpu_possible_map initialization X-Git-Tag: MMI-PSA29.97-13-9~28442^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88e012856d05a5d00ae80c691fb7aa5adda268d7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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= 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 def6cfb70bab83c0094bc0cedd27c4eda563043e "[S390] cpumask: Use accessors code." Cc: Rusty Russell Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 796630240715..a985a3ba4401 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -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; }