tree 9936b6014dda94ed52efe64e34f9d923cbae8390
parent fdf26d933a8171c2a5bd35b4a5ca3b099a216a35
author Ashok Raj <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:01:53 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 03:57:30 -0700

[PATCH] x86_64: Don't call enforce_max_cpus when hotplug is enabled

enforce_max_cpus nukes out cpu_present_map and cpu_possible_map making it
impossible to add new cpus in the system.  Since it doesnt provide any
additional value apart this call and reference is removed.

Signed-off-by: Ashok Raj <[EMAIL PROTECTED]>
Acked-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 arch/x86_64/kernel/smpboot.c |   19 -------------------
 1 files changed, 19 deletions(-)

diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -894,23 +894,6 @@ static __init void disable_smp(void)
        cpu_set(0, cpu_core_map[0]);
 }
 
-/*
- * Handle user cpus=... parameter.
- */
-static __init void enforce_max_cpus(unsigned max_cpus)
-{
-       int i, k;
-       k = 0;
-       for (i = 0; i < NR_CPUS; i++) {
-               if (!cpu_possible(i))
-                       continue;
-               if (++k > max_cpus) {
-                       cpu_clear(i, cpu_possible_map);
-                       cpu_clear(i, cpu_present_map);
-               }
-       }
-}
-
 #ifdef CONFIG_HOTPLUG_CPU
 /*
  * cpu_possible_map should be static, it cannot change as cpu's
@@ -999,8 +982,6 @@ void __init smp_prepare_cpus(unsigned in
        current_cpu_data = boot_cpu_data;
        current_thread_info()->cpu = 0;  /* needed? */
 
-       enforce_max_cpus(max_cpus);
-
 #ifdef CONFIG_HOTPLUG_CPU
        prefill_possible_map();
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to