summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r--sys/kern/subr_smp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index b9e96fe..95ad79a 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -2266,6 +2266,12 @@ ap_init(void)
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);
@@ -2322,12 +2328,6 @@ ap_init(void)
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);
OpenPOWER on IntegriCloud