From: Paul M. <le...@us...> - 2001-08-25 02:19:33
|
Update of /cvsroot/linux-mips/linux/init In directory usw-pr-cvs1:/tmp/cvs-serv13548/init Modified Files: main.c Log Message: Sync to 2.4.7 Index: main.c =================================================================== RCS file: /cvsroot/linux-mips/linux/init/main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.c 2001/08/10 19:32:35 1.4 --- main.c 2001/08/25 02:19:28 1.5 *************** *** 505,508 **** --- 505,523 ---- /* + * We need to finalize in a non-__init function or else race conditions + * between the root thread and the init thread may cause start_kernel to + * be reaped by free_initmem before the root thread has proceeded to + * cpu_idle. + */ + + static void rest_init(void) + { + kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL); + unlock_kernel(); + current->need_resched = 1; + cpu_idle(); + } + + /* * Activate the first processor. */ *************** *** 525,530 **** init_IRQ(); sched_init(); - time_init(); softirq_init(); /* --- 540,545 ---- init_IRQ(); sched_init(); softirq_init(); + time_init(); /* *************** *** 589,596 **** */ smp_init(); ! kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL); ! unlock_kernel(); ! current->need_resched = 1; ! cpu_idle(); } --- 604,608 ---- */ smp_init(); ! rest_init(); } |