diff -urN 2.2.10/arch/i386/kernel/process.c 2.2.10-SMP/arch/i386/kernel/process.c --- 2.2.10/arch/i386/kernel/process.c Tue Jul 13 00:33:09 1999 +++ 2.2.10-SMP/arch/i386/kernel/process.c Thu Jul 22 01:39:30 1999 @@ -111,7 +111,6 @@ /* endless idle loop with no priority at all */ current->priority = 0; current->counter = -100; - init_idle(); for (;;) { if (work) @@ -141,7 +140,6 @@ /* endless idle loop with no priority at all */ current->priority = 0; current->counter = -100; - init_idle(); while(1) { if (current_cpu_data.hlt_works_ok && !hlt_counter && diff -urN 2.2.10/arch/i386/kernel/smp.c 2.2.10-SMP/arch/i386/kernel/smp.c --- 2.2.10/arch/i386/kernel/smp.c Tue Jul 13 00:33:20 1999 +++ 2.2.10-SMP/arch/i386/kernel/smp.c Thu Jul 22 01:43:08 1999 @@ -863,6 +863,14 @@ smp_store_cpu_info(cpuid); /* + * Unblock the master CPU _only_ when the scheduler state + * of all secondary CPUs will be up-to-date, so after + * the SMP initialization the master will be just allowed + * to call the scheduler code. + */ + init_idle(); + + /* * Allow the master to continue. */ set_bit(cpuid, (unsigned long *)&cpu_callin_map[0]); diff -urN 2.2.10/kernel/sched.c 2.2.10-SMP/kernel/sched.c --- 2.2.10/kernel/sched.c Tue Jul 13 00:33:10 1999 +++ 2.2.10-SMP/kernel/sched.c Thu Jul 22 01:39:30 1999 @@ -322,7 +322,7 @@ int this_cpu = smp_processor_id(); struct task_struct *tsk; - tsk = cpu_curr(this_cpu); + tsk = current; if (preemption_goodness(tsk, p, this_cpu) > 0) tsk->need_resched = 1; #endif