diff options
author | Ashok Raj <ashok.raj@intel.com> | 2006-02-16 17:01:48 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-02-16 17:10:50 -0500 |
commit | 8f8b1138fc9f65e3591aac83a4ee394fef34ac1d (patch) | |
tree | 2c4d34391681cb5aa5ed8e5f2def1502a8a4b333 /arch | |
parent | 6f6d75825dc49b082906b84537b4df28293c2977 (diff) |
[IA64] Count disabled cpus as potential hot-pluggable CPUs
Minor updates to earlier patch.
- Added to documentation to add ia64 as well.
- Minor clarification on how to use disabled cpus
- used plain max instead of max_t per Andew Morton.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 19 |
1 files changed, 8 insertions, 11 deletions
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); |