net: phy: icplus: add PHY counter for IP101G
[linux-2.6-microblaze.git] / init / main.c
index 6feee7f..a626e78 100644 (file)
@@ -1066,7 +1066,13 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
 /* Call all constructor functions linked into the kernel. */
 static void __init do_ctors(void)
 {
-#ifdef CONFIG_CONSTRUCTORS
+/*
+ * For UML, the constructors have already been called by the
+ * normal setup code as it's just a normal ELF binary, so we
+ * cannot do it again - but we do need CONFIG_CONSTRUCTORS
+ * even on UML for modules.
+ */
+#if defined(CONFIG_CONSTRUCTORS) && !defined(CONFIG_UML)
        ctor_fn_t *fn = (ctor_fn_t *) __ctors_start;
 
        for (; fn < (ctor_fn_t *) __ctors_end; fn++)
@@ -1480,14 +1486,8 @@ void __init console_on_rootfs(void)
        struct file *file = filp_open("/dev/console", O_RDWR, 0);
 
        if (IS_ERR(file)) {
-               pr_err("Warning: unable to open an initial console. Fallback to ttynull.\n");
-               register_ttynull_console();
-
-               file = filp_open("/dev/console", O_RDWR, 0);
-               if (IS_ERR(file)) {
-                       pr_err("Warning: Failed to add ttynull console. No stdin, stdout, and stderr for the init process!\n");
-                       return;
-               }
+               pr_err("Warning: unable to open an initial console.\n");
+               return;
        }
        init_dup(file);
        init_dup(file);
@@ -1518,6 +1518,7 @@ static noinline void __init kernel_init_freeable(void)
 
        init_mm_internals();
 
+       rcu_init_tasks_generic();
        do_pre_smp_initcalls();
        lockup_detector_init();