diff options
| author | Andrew Turner <andrew@FreeBSD.org> | 2015-05-23 22:28:59 +0000 |
|---|---|---|
| committer | Andrew Turner <andrew@FreeBSD.org> | 2015-05-23 22:28:59 +0000 |
| commit | f22cb06aeb40c35aa1868c88dc0ad7db50d1a2bb (patch) | |
| tree | 97b9b91fe551daef37eb4c2a8c23c01889c548f7 | |
| parent | 262a84286dee36109582d886f381770942938a5a (diff) | |
Notes
| -rw-r--r-- | sys/arm/arm/mp_machdep.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c index c0f723cc6279a..88104f0c3b2da 100644 --- a/sys/arm/arm/mp_machdep.c +++ b/sys/arm/arm/mp_machdep.c @@ -185,8 +185,11 @@ init_secondary(int cpu) atomic_add_rel_32(&mp_naps, 1); /* Spin until the BSP releases the APs */ - while (!aps_ready) - ; + while (!atomic_load_acq_int(&aps_ready)) { +#if __ARM_ARCH >= 7 + __asm __volatile("wfe"); +#endif + } /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); @@ -353,6 +356,10 @@ release_aps(void *dummy __unused) arm_unmask_irq(i); } atomic_store_rel_int(&aps_ready, 1); + /* Wake the other threads up */ +#if __ARM_ARCH >= 7 + armv7_sev(); +#endif printf("Release APs\n"); |
