Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756841AbZDNN46 (ORCPT ); Tue, 14 Apr 2009 09:56:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756343AbZDNNyA (ORCPT ); Tue, 14 Apr 2009 09:54:00 -0400 Received: from mtagate4.de.ibm.com ([195.212.29.153]:42062 "EHLO mtagate4.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755266AbZDNNxv (ORCPT ); Tue, 14 Apr 2009 09:53:51 -0400 Message-Id: <20090414135348.874771700@de.ibm.com> References: <20090414135327.576111185@de.ibm.com> User-Agent: quilt/0.46-1 Date: Tue, 14 Apr 2009 15:53:37 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Heiko Carstens , Rusty Russell , Martin Schwidefsky Subject: [patch 10/14] smp: fix cpu_possible_map initialization Content-Disposition: inline; filename=010-cpu-possible-map.diff Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1613 Lines: 47 From: Heiko Carstens 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 --- arch/s390/kernel/smp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: quilt-2.6/arch/s390/kernel/smp.c =================================================================== --- quilt-2.6.orig/arch/s390/kernel/smp.c +++ quilt-2.6/arch/s390/kernel/smp.c @@ -591,7 +591,8 @@ static int __init setup_possible_cpus(ch 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; } -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/