aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/cpu-hotplug.txt6
-rw-r--r--arch/s390/kernel/smp.c14
2 files changed, 17 insertions, 3 deletions
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 4d3355da0e2..e71bc6cbbc5 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -58,6 +58,12 @@ mark such hot-pluggable cpus as disabled entries, one could use this
parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
+possible_cpus=n [s390 only] use this to set hotpluggable cpus.
+ This option sets possible_cpus bits in
+ cpu_possible_map. Thus keeping the numbers of bits set
+ constant even if the machine gets rebooted.
+ This option overrides additional_cpus.
+
CPU maps and such
-----------------
[More on cpumaps and primitive to manipulate, please check
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 53291e94ac7..d0a2745aec7 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)
{