summaryrefslogtreecommitdiffstats
path: root/sys/arm64
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-04-25 17:32:08 +0000
committerandrew <andrew@FreeBSD.org>2016-04-25 17:32:08 +0000
commitb40ffdceea7e4c7e883265a00fc36fa28d67bec7 (patch)
treee4a586535d340fc169ee01a7f5f12457d77cd7dd /sys/arm64
parent3f9624c2d6fa37490ee239309298e17530ac9c19 (diff)
downloadFreeBSD-src-b40ffdceea7e4c7e883265a00fc36fa28d67bec7.zip
FreeBSD-src-b40ffdceea7e4c7e883265a00fc36fa28d67bec7.tar.gz
Use the yield instruction in the arm64 cpu_spinwait. This instruction is
a hint to the hardware the software is not performing a task. Sponsored by: ABT Systems Ltd
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/include/cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
index 520729c..7643837 100644
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -50,7 +50,7 @@
#define cpu_getstack(td) ((td)->td_frame->tf_sp)
#define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp))
-#define cpu_spinwait() /* nothing */
+#define cpu_spinwait() __asm __volatile("yield" ::: "memory")
/* Extract CPU affinity levels 0-3 */
#define CPU_AFF0(mpidr) (u_int)(((mpidr) >> 0) & 0xff)
OpenPOWER on IntegriCloud