X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=init%2Fmain.c;h=f605a969ea6141281891bb007edc41938c63e3f1;hb=f3344c54cee4c446a39d046e47707ed9d259f72c;hp=d3bcb3b11620784a37dd6d44561a874e9df1d982;hpb=e8b495fe09bc793ae26774e7b2667f7f658d56e2;p=~andy%2Flinux diff --git a/init/main.c b/init/main.c index d3bcb3b1162..f605a969ea6 100644 --- a/init/main.c +++ b/init/main.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -69,15 +70,7 @@ /* * This is one of the first .c files built. Error out early if we have compiler * trouble. - * - * Versions of gcc older than that listed below may actually compile and link - * okay, but the end product can have subtle run time bugs. To avoid associated - * bogus bug reports, we flatly refuse to compile with a gcc that is known to be - * too old from the very beginning. */ -#if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 2) -#error Sorry, your GCC is too old. It builds incorrect kernels. -#endif #if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0 #warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. @@ -146,9 +139,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 +155,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 @@ -279,7 +280,7 @@ static int __init unknown_bootoption(char *param, char *val) return 0; /* - * Preemptive maintenance for "why didn't my mispelled command + * Preemptive maintenance for "why didn't my misspelled command * line work?" */ if (strchr(param, '.') && (!val || strchr(param, '.') < val)) { @@ -389,10 +390,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) @@ -519,6 +516,7 @@ asmlinkage void __init start_kernel(void) */ unwind_init(); lockdep_init(); + cgroup_init_early(); local_irq_disable(); early_boot_irqs_off(); @@ -537,10 +535,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 */ @@ -640,6 +634,7 @@ asmlinkage void __init start_kernel(void) #ifdef CONFIG_PROC_FS proc_root_init(); #endif + cgroup_init(); cpuset_init(); taskstats_init_early(); delayacct_init();