[PATCH] x86_64: Fix the additional_cpus=.. option
authorAndi Kleen <ak@suse.de>
Sun, 26 Feb 2006 03:18:46 +0000 (04:18 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Feb 2006 17:53:30 +0000 (09:53 -0800)
It didn't set up the CPU possible map early enough, so the
option didn't actually work.

Noticed by Heiko Carstens

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/smpboot.c
include/asm-x86_64/proto.h

index 9435ab7..5de7eaf 100644 (file)
@@ -423,6 +423,12 @@ static __init void parse_cmdline_early (char ** cmdline_p)
                else if(!memcmp(from, "elfcorehdr=", 11))
                        elfcorehdr_addr = memparse(from+11, &from);
 #endif
+
+#ifdef CONFIG_SMP
+               else if (!memcmp(from, "additional_cpus=", 16))
+                       setup_additional_cpus(from+16);
+#endif
+
        next_char:
                c = *(from++);
                if (!c)
index 67e4e28..b82eb86 100644 (file)
@@ -1244,7 +1244,7 @@ void __cpu_die(unsigned int cpu)
        printk(KERN_ERR "CPU %u didn't die...\n", cpu);
 }
 
-static __init int setup_additional_cpus(char *s)
+__init int setup_additional_cpus(char *s)
 {
        return get_option(&s, &additional_cpus);
 }
index eca3f2d..8bdcbd0 100644 (file)
@@ -134,6 +134,7 @@ extern int force_iommu;
 
 extern int reboot_force;
 extern int notsc_setup(char *);
+extern int setup_additional_cpus(char *);
 
 extern void smp_local_timer_interrupt(struct pt_regs * regs);