[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 9435ab7d6fb83131a6efd4b24a9d6cd7621a76fd..5de7eaf5d97cd678025e520cb5d5b2a3041508b5 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 67e4e28f4df8d79d9b97d76b7e2ec0fbf794f5e1..b82eb86e4f5de33b9963b17ddfb8a39be84f351d 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 eca3f2d633dbb67368e57cdd0e550218f1ea4516..8bdcbd0aa03f5845491e6692440bbed2ad36c50b 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);