aboutsummaryrefslogtreecommitdiff
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2006-02-16 14:01:48 -0800
committerTony Luck <tony.luck@intel.com>2006-02-16 14:10:50 -0800
commit8f8b1138fc9f65e3591aac83a4ee394fef34ac1d (patch)
tree2c4d34391681cb5aa5ed8e5f2def1502a8a4b333 /arch/ia64/kernel
parent6f6d75825dc49b082906b84537b4df28293c2977 (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/ia64/kernel')
-rw-r--r--arch/ia64/kernel/acpi.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 34795ede72e..ecd44bdc839 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/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);