aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/cpu-hotplug.txt14
-rw-r--r--arch/ia64/kernel/acpi.c19
2 files changed, 20 insertions, 13 deletions
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 08c5d04f3086..e05278087ffa 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -44,10 +44,20 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
44 maxcpus=2 will only boot 2. You can choose to bring the 44 maxcpus=2 will only boot 2. You can choose to bring the
45 other cpus later online, read FAQ's for more info. 45 other cpus later online, read FAQ's for more info.
46 46
47additional_cpus=n [x86_64 only] use this to limit hotpluggable cpus. 47additional_cpus*=n Use this to limit hotpluggable cpus. This option sets
48 This option sets
49 cpu_possible_map = cpu_present_map + additional_cpus 48 cpu_possible_map = cpu_present_map + additional_cpus
50 49
50(*) Option valid only for following architectures
51- x86_64, ia64
52
53ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT
54to determine the number of potentially hot-pluggable cpus. The implementation
55should only rely on this to count the #of cpus, but *MUST* not rely on the
56apicid values in those tables for disabled apics. In the event BIOS doesnt
57mark such hot-pluggable cpus as disabled entries, one could use this
58parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
59
60
51CPU maps and such 61CPU maps and such
52----------------- 62-----------------
53[More on cpumaps and primitive to manipulate, please check 63[More on cpumaps and primitive to manipulate, please check
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 34795ede72e0..ecd44bdc8394 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -794,24 +794,21 @@ __init void prefill_possible_map(void)
794 int possible, disabled_cpus; 794 int possible, disabled_cpus;
795 795
796 disabled_cpus = total_cpus - available_cpus; 796 disabled_cpus = total_cpus - available_cpus;
797
797 if (additional_cpus == -1) { 798 if (additional_cpus == -1) {
798 if (disabled_cpus > 0) { 799 if (disabled_cpus > 0)
799 possible = total_cpus;
800 additional_cpus = disabled_cpus; 800 additional_cpus = disabled_cpus;
801 } 801 else
802 else {
803 possible = available_cpus;
804 additional_cpus = 0; 802 additional_cpus = 0;
805 } 803 }
806 } else { 804
807 possible = available_cpus + additional_cpus; 805 possible = available_cpus + additional_cpus;
808 } 806
809 if (possible > NR_CPUS) 807 if (possible > NR_CPUS)
810 possible = NR_CPUS; 808 possible = NR_CPUS;
811 809
812 printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", 810 printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
813 possible, 811 possible, max((possible - available_cpus), 0));
814 max_t(int, additional_cpus, 0));
815 812
816 for (i = 0; i < possible; i++) 813 for (i = 0; i < possible; i++)
817 cpu_set(i, cpu_possible_map); 814 cpu_set(i, cpu_possible_map);