public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 10/14] smp: fix cpu_possible_map initialization
Date: Tue, 14 Apr 2009 15:53:37 +0200	[thread overview]
Message-ID: <20090414135348.874771700@de.ibm.com> (raw)
In-Reply-To: 20090414135327.576111185@de.ibm.com

[-- Attachment #1: 010-cpu-possible-map.diff --]
[-- Type: text/plain, Size: 1368 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

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 def6cfb70bab83c0094bc0cedd27c4eda563043e
"[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>
---

 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.


  parent reply	other threads:[~2009-04-14 13:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 13:53 [patch 00/14] s390 patches for 2.6.30-rc1 Martin Schwidefsky
2009-04-14 13:53 ` [patch 01/14] s390: move machine flags to lowcore Martin Schwidefsky
2009-04-14 13:53 ` [patch 02/14] wire up preadv/pwritev system calls Martin Schwidefsky
2009-04-14 13:53 ` [patch 03/14] call nmi_enter/nmi_exit on machine checks Martin Schwidefsky
2009-04-14 13:53 ` [patch 04/14] stp synchronization retry timer Martin Schwidefsky
2009-04-14 13:53 ` [patch 05/14] extend virtual timer interface by mod_virt_timer_periodic Martin Schwidefsky
2009-04-14 13:53 ` [patch 06/14] appldata: Use new mod_virt_timer_periodic() function Martin Schwidefsky
2009-04-14 13:53 ` [patch 07/14] qdio: remove dead timeout handler Martin Schwidefsky
2009-04-14 13:53 ` [patch 08/14] dasd: Use the new async framework for autoonlining Martin Schwidefsky
2009-04-14 13:53 ` [patch 09/14] dasd: fix idaw boundary checking for track based ccw Martin Schwidefsky
2009-04-14 13:53 ` Martin Schwidefsky [this message]
2009-04-15  2:06   ` [patch 10/14] smp: fix cpu_possible_map initialization Rusty Russell
2009-04-14 13:53 ` [patch 11/14] fix idle time accounting Martin Schwidefsky
2009-04-14 13:53 ` [patch 12/14] cpu hotplug and accounting values Martin Schwidefsky
2009-04-14 13:53 ` [patch 13/14] add read_persistent_clock Martin Schwidefsky
2009-04-14 13:53 ` [patch 14/14] boot cputime accounting Martin Schwidefsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090414135348.874771700@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox