x86: use possible_cpus=NUM to extend the possible cpus allowed
Impact: add new boot parameter Use possible_cpus=NUM kernel parameter to extend the number of possible cpus. The ability to HOTPLUG ON cpus that are "possible" but not "present" is dealt with in a later patch. Signed-off-by: Mike Travis <travis@sgi.com>
This commit is contained in:
@@ -1252,6 +1252,15 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
|
||||
check_nmi_watchdog();
|
||||
}
|
||||
|
||||
static int __initdata setup_possible_cpus = -1;
|
||||
static int __init _setup_possible_cpus(char *str)
|
||||
{
|
||||
get_option(&str, &setup_possible_cpus);
|
||||
return 0;
|
||||
}
|
||||
early_param("possible_cpus", _setup_possible_cpus);
|
||||
|
||||
|
||||
/*
|
||||
* cpu_possible_map should be static, it cannot change as cpu's
|
||||
* are onlined, or offlined. The reason is per-cpu data-structures
|
||||
@@ -1264,7 +1273,7 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
|
||||
*
|
||||
* Three ways to find out the number of additional hotplug CPUs:
|
||||
* - If the BIOS specified disabled CPUs in ACPI/mptables use that.
|
||||
* - The user can overwrite it with additional_cpus=NUM
|
||||
* - The user can overwrite it with possible_cpus=NUM
|
||||
* - Otherwise don't reserve additional CPUs.
|
||||
* We do this because additional CPUs waste a lot of memory.
|
||||
* -AK
|
||||
@@ -1277,9 +1286,17 @@ __init void prefill_possible_map(void)
|
||||
if (!num_processors)
|
||||
num_processors = 1;
|
||||
|
||||
possible = num_processors + disabled_cpus;
|
||||
if (possible > NR_CPUS)
|
||||
possible = NR_CPUS;
|
||||
if (setup_possible_cpus == -1)
|
||||
possible = num_processors + disabled_cpus;
|
||||
else
|
||||
possible = setup_possible_cpus;
|
||||
|
||||
if (possible > CONFIG_NR_CPUS) {
|
||||
printk(KERN_WARNING
|
||||
"%d Processors exceeds NR_CPUS limit of %d\n",
|
||||
possible, CONFIG_NR_CPUS);
|
||||
possible = CONFIG_NR_CPUS;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
|
||||
possible, max_t(int, possible - num_processors, 0));
|
||||
|
Reference in New Issue
Block a user