From c02ab7087adfa71670f4fab9700ead54a9a9b499 Mon Sep 17 00:00:00 2001 From: Ashok Raj Date: Thu, 16 Feb 2006 14:01:48 -0800 Subject: [PATCH] --- yaml --- r: 20449 b: refs/heads/master c: 8f8b1138fc9f65e3591aac83a4ee394fef34ac1d h: refs/heads/master i: 20447: d1b506209b7c5d78f5541e48f6ef080eb9d9958f v: v3 --- [refs] | 2 +- trunk/Documentation/cpu-hotplug.txt | 14 ++++++++++++-- trunk/arch/ia64/kernel/acpi.c | 19 ++++++++----------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index f7d30c3fc033..a109ea136fcd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6f6d75825dc49b082906b84537b4df28293c2977 +refs/heads/master: 8f8b1138fc9f65e3591aac83a4ee394fef34ac1d diff --git a/trunk/Documentation/cpu-hotplug.txt b/trunk/Documentation/cpu-hotplug.txt index 08c5d04f3086..e05278087ffa 100644 --- a/trunk/Documentation/cpu-hotplug.txt +++ b/trunk/Documentation/cpu-hotplug.txt @@ -44,10 +44,20 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using maxcpus=2 will only boot 2. You can choose to bring the other cpus later online, read FAQ's for more info. -additional_cpus=n [x86_64 only] use this to limit hotpluggable cpus. - This option sets +additional_cpus*=n Use this to limit hotpluggable cpus. This option sets cpu_possible_map = cpu_present_map + additional_cpus +(*) Option valid only for following architectures +- x86_64, ia64 + +ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT +to determine the number of potentially hot-pluggable cpus. The implementation +should only rely on this to count the #of cpus, but *MUST* not rely on the +apicid values in those tables for disabled apics. In the event BIOS doesnt +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. + + CPU maps and such ----------------- [More on cpumaps and primitive to manipulate, please check diff --git a/trunk/arch/ia64/kernel/acpi.c b/trunk/arch/ia64/kernel/acpi.c index 34795ede72e0..ecd44bdc8394 100644 --- a/trunk/arch/ia64/kernel/acpi.c +++ b/trunk/arch/ia64/kernel/acpi.c @@ -794,24 +794,21 @@ __init void prefill_possible_map(void) int possible, disabled_cpus; disabled_cpus = total_cpus - available_cpus; + if (additional_cpus == -1) { - if (disabled_cpus > 0) { - possible = total_cpus; + if (disabled_cpus > 0) additional_cpus = disabled_cpus; - } - else { - possible = available_cpus; + else additional_cpus = 0; - } - } else { - possible = available_cpus + additional_cpus; - } + } + + possible = available_cpus + additional_cpus; + if (possible > NR_CPUS) possible = NR_CPUS; printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", - possible, - max_t(int, additional_cpus, 0)); + possible, max((possible - available_cpus), 0)); for (i = 0; i < possible; i++) cpu_set(i, cpu_possible_map);