diff options
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 12 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 12 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 12 | ||||
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 12 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 12 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 12 | ||||
-rw-r--r-- | sys/kern/subr_smp.c | 12 |
7 files changed, 42 insertions, 42 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index b9e96fe..95ad79a 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.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); diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index b9e96fe..95ad79a 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.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); diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index b9e96fe..95ad79a 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -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); diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index b9e96fe..95ad79a 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.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); diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index b9e96fe..95ad79a 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.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); diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index b9e96fe..95ad79a 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -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); 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); |