Index: sys/i386/i386/mp_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v retrieving revision 1.142 diff -u -r1.142 mp_machdep.c --- sys/i386/i386/mp_machdep.c 2001/01/28 01:07:53 1.142 +++ sys/i386/i386/mp_machdep.c 2001/01/28 03:34:05 @@ -2266,6 +2266,12 @@ while (!aps_ready) /* spin */ ; + /* + * Set curproc to our per-cpu idleproc so that mutexes have + * something unique to lock with. + */ + PCPU_SET(curproc, PCPU_GET(idleproc)); + /* lock against other AP's that are waking up */ mtx_enter(&ap_boot_mtx, MTX_SPIN); @@ -2321,12 +2327,6 @@ /* wait until all the AP's are up */ while (smp_started == 0) ; /* nothing */ - - /* - * Set curproc to our per-cpu idleproc so that mutexes have - * something unique to lock with. - */ - PCPU_SET(curproc, PCPU_GET(idleproc)); microuptime(PCPU_PTR(switchtime)); PCPU_SET(switchticks, ticks);