X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=init%2Fmain.c;h=9def935ab13a27c829e28bb2830cdbe2c6fd900d;hb=821f3eff7cdb9d6c7076effabd46c96c322daed1;hp=d3bcb3b11620784a37dd6d44561a874e9df1d982;hpb=2e85622042cb5fd56a606e884651ffde52f21028;p=powerpc.git diff --git a/init/main.c b/init/main.c index d3bcb3b116..9def935ab1 100644 --- a/init/main.c +++ b/init/main.c @@ -146,9 +146,14 @@ static unsigned int __initdata max_cpus = NR_CPUS; * greater than 0, limits the maximum number of CPUs activated in * SMP mode to . */ +#ifndef CONFIG_X86_IO_APIC +static inline void disable_ioapic_setup(void) {}; +#endif + static int __init nosmp(char *str) { max_cpus = 0; + disable_ioapic_setup(); return 0; } @@ -157,10 +162,13 @@ early_param("nosmp", nosmp); static int __init maxcpus(char *str) { get_option(&str, &max_cpus); - return 1; + if (max_cpus == 0) + disable_ioapic_setup(); + + return 0; } -__setup("maxcpus=", maxcpus); +early_param("maxcpus", maxcpus); #else #define max_cpus NR_CPUS #endif @@ -389,10 +397,6 @@ static void __init smp_init(void) { unsigned int cpu; -#ifndef CONFIG_HOTPLUG_CPU - cpu_possible_map = cpu_present_map; -#endif - /* FIXME: This should be done in userspace --RR */ for_each_present_cpu(cpu) { if (num_online_cpus() >= max_cpus) @@ -537,10 +541,6 @@ asmlinkage void __init start_kernel(void) setup_arch(&command_line); setup_command_line(command_line); unwind_setup(); -#ifndef CONFIG_HOTPLUG_CPU - if (max_cpus < 2) - cpu_possible_map = cpu_online_map; -#endif setup_per_cpu_areas(); smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */