diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-02-17 13:52:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-17 13:59:27 -0800 |
commit | 37a3302618a51520e2056494715ea6b4776dd8ab (patch) | |
tree | 379fd117bb816fd012dd58ba9c900e20792a8ae3 /arch/s390 | |
parent | 255acee706b333b79f593dd366f16e1f107cccc3 (diff) | |
download | kernel_samsung_smdk4412-37a3302618a51520e2056494715ea6b4776dd8ab.zip kernel_samsung_smdk4412-37a3302618a51520e2056494715ea6b4776dd8ab.tar.gz kernel_samsung_smdk4412-37a3302618a51520e2056494715ea6b4776dd8ab.tar.bz2 |
[PATCH] s390: possible_cpus parameter
Introduce possible_cpus command line option. Hard sets the number of bits set
in cpu_possible_map. Unlike the additional_cpus parameter this one guarantees
that num_possible_cpus() will stay constant even if the system gets rebooted
and a different number of cpus are present at startup.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/smp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 53291e9..d0a2745 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -673,15 +673,16 @@ __cpu_up(unsigned int cpu) } static unsigned int __initdata additional_cpus; +static unsigned int __initdata possible_cpus; void __init smp_setup_cpu_possible_map(void) { unsigned int pcpus, cpu; - pcpus = smp_count_cpus() + additional_cpus; + pcpus = min(smp_count_cpus() + additional_cpus, (unsigned int) NR_CPUS); - if (pcpus > NR_CPUS) - pcpus = NR_CPUS; + if (possible_cpus) + pcpus = min(possible_cpus, (unsigned int) NR_CPUS); for (cpu = 0; cpu < pcpus; cpu++) cpu_set(cpu, cpu_possible_map); @@ -698,6 +699,13 @@ static int __init setup_additional_cpus(char *s) } early_param("additional_cpus", setup_additional_cpus); +static int __init setup_possible_cpus(char *s) +{ + possible_cpus = simple_strtoul(s, NULL, 0); + return 0; +} +early_param("possible_cpus", setup_possible_cpus); + int __cpu_disable(void) { |