X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=init%2Fmain.c;h=e092b1979a9052022d20696c42a2ee22698738ae;hb=a87d7fddbd7f46475842431d153d35bd03cf4f63;hp=f142d403534190f4588b3d7eda585112077e0607;hpb=5833f1420b96c4f9b193b7f2fcbc0003dc032fe8;p=linux-2.6-omap-h63xx.git diff --git a/init/main.c b/init/main.c index f142d403534..e092b1979a9 100644 --- a/init/main.c +++ b/init/main.c @@ -47,22 +47,17 @@ #include #include #include -#include #include #include #include #include +#include /* * This is one of the first .c files built. Error out early * if we have compiler trouble.. */ -#if __GNUC__ == 2 && __GNUC_MINOR__ == 96 -#ifdef CONFIG_FRAME_POINTER -#error This compiler cannot compile correctly with frame pointers enabled -#endif -#endif #ifdef CONFIG_X86_LOCAL_APIC #include @@ -74,7 +69,7 @@ * 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__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 95) +#if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 2) #error Sorry, your GCC is too old. It builds incorrect kernels. #endif @@ -100,6 +95,9 @@ extern void acpi_early_init(void); #else static inline void acpi_early_init(void) { } #endif +#ifndef CONFIG_DEBUG_RODATA +static inline void mark_rodata_ro(void) { } +#endif #ifdef CONFIG_TC extern void tc_init(void); @@ -394,14 +392,16 @@ static void noinline rest_init(void) kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND); numa_default_policy(); unlock_kernel(); - preempt_enable_no_resched(); /* * The boot idle thread must execute schedule() * at least one to get things moving: */ + preempt_enable_no_resched(); schedule(); + preempt_disable(); + /* Call into cpu_idle with preempt disabled */ cpu_idle(); } @@ -485,6 +485,7 @@ asmlinkage void __init start_kernel(void) init_IRQ(); pidhash_init(); init_timers(); + hrtimers_init(); softirq_init(); time_init(); @@ -507,6 +508,7 @@ asmlinkage void __init start_kernel(void) } #endif vfs_caches_init_early(); + cpuset_init_early(); mem_init(); kmem_cache_init(); setup_per_cpu_pageset(); @@ -612,9 +614,6 @@ static void __init do_basic_setup(void) sysctl_init(); #endif - /* Networking initialization needs a process context */ - sock_init(); - do_initcalls(); } @@ -710,6 +709,7 @@ static int init(void * unused) */ free_initmem(); unlock_kernel(); + mark_rodata_ro(); system_state = SYSTEM_RUNNING; numa_default_policy();