[PATCH] Add warning `init=' to init/main.c
[cascardo/linux.git] / init / main.c
index d324801..e4dbcbc 100644 (file)
 #include <linux/rmap.h>
 #include <linux/mempolicy.h>
 #include <linux/key.h>
+#include <net/sock.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
 #include <asm/setup.h>
+#include <asm/sections.h>
 
 /*
  * This is one of the first .c files built. Error out early
@@ -79,7 +81,6 @@
 static int init(void *);
 
 extern void init_IRQ(void);
-extern void sock_init(void);
 extern void fork_init(unsigned long);
 extern void mca_init(void);
 extern void sbus_init(void);
@@ -323,8 +324,6 @@ static void __init setup_per_cpu_areas(void)
 {
        unsigned long size, i;
        char *ptr;
-       /* Created by linker magic */
-       extern char __per_cpu_start[], __per_cpu_end[];
 
        /* Copy section for each CPU (we discard the original) */
        size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
@@ -383,6 +382,13 @@ static void noinline rest_init(void)
        numa_default_policy();
        unlock_kernel();
        preempt_enable_no_resched();
+
+       /*
+        * The boot idle thread must execute schedule()
+        * at least one to get things moving:
+        */
+       schedule();
+
        cpu_idle();
 } 
 
@@ -608,6 +614,7 @@ static void do_pre_smp_initcalls(void)
        migration_init();
 #endif
        spawn_ksoftirqd();
+       spawn_softlockup_task();
 }
 
 static void run_init_process(char *init_filename)
@@ -701,10 +708,11 @@ static int init(void * unused)
         * The Bourne shell can be used instead of init if we are 
         * trying to recover a really broken machine.
         */
-
-       if (execute_command)
+       if (execute_command) {
                run_init_process(execute_command);
-
+               printk(KERN_WARNING "Failed to execute %s.  Attempting "
+                                       "defaults...\n", execute_command);
+       }
        run_init_process("/sbin/init");
        run_init_process("/etc/init");
        run_init_process("/bin/init");