Debugging patch to see if we can figure out why some systems fail to boot or initialise hardware correctly. If this fixes a problem for you, PLEASE report it back! Index: linux-2.6.31-bfs/init/main.c =================================================================== --- linux-2.6.31-bfs.orig/init/main.c 2009-09-14 09:33:13.977147049 +1000 +++ linux-2.6.31-bfs/init/main.c 2009-09-14 09:57:20.278144478 +1000 @@ -829,6 +829,8 @@ kernel_execve(init_filename, argv_init, envp_init); } +int fragile_boot = 1; + /* This is a non __init function. Force it to be noinline otherwise gcc * makes it inline to init() and it becomes part of init.text section */ @@ -851,6 +853,9 @@ current->signal->flags |= SIGNAL_UNKILLABLE; + printk(KERN_INFO "Disabling Fragile boot.\n"); + fragile_boot = 0; + if (ramdisk_execute_command) { run_init_process(ramdisk_execute_command); printk(KERN_WARNING "Failed to execute %s\n", Index: linux-2.6.31-bfs/kernel/sched_bfs.c =================================================================== --- linux-2.6.31-bfs.orig/kernel/sched_bfs.c 2009-09-14 09:33:13.997144999 +1000 +++ linux-2.6.31-bfs/kernel/sched_bfs.c 2009-09-14 09:46:19.217144751 +1000 @@ -1160,6 +1160,8 @@ put_cpu(); } +extern int fragile_boot; + /* * wake_up_new_task - wake up a newly created task for the first time. * @@ -1167,7 +1169,7 @@ * that must be done for every newly created context, then puts the task * on the runqueue and wakes it. */ -void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) +static void wunt(struct task_struct *p, unsigned long clone_flags) { struct task_struct *parent; unsigned long flags; @@ -1193,6 +1195,33 @@ task_grq_unlock(&flags); } +/* Fragile version to not wake to other cpus during boot */ +static void fb_wunt(struct task_struct *p, unsigned long clone_flags) +{ + struct task_struct *parent; + unsigned long flags; + struct rq *rq = time_task_grq_lock(p, &flags); + + parent = p->parent; + BUG_ON(p->state != TASK_RUNNING); + set_task_cpu(p, task_cpu(parent)); + + activate_task(p, rq); + trace_sched_wakeup_new(rq, p, 1); + /* Child always runs first */ + set_tsk_need_resched(parent); + rq->preempt_next = p; + task_grq_unlock(&flags); +} + +void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) +{ + if (unlikely(fragile_boot)) + fb_wunt(p, clone_flags); + else + wunt(p, clone_flags); +} + /* * Potentially available exiting-child timeslices are * retrieved here - this way the parent does not get