svn commit: r298586 - head/sys/arm64/include
Andrew Turner
andrew at FreeBSD.org
Mon Apr 25 17:32:10 UTC 2016
Author: andrew
Date: Mon Apr 25 17:32:08 2016
New Revision: 298586
URL: https://svnweb.freebsd.org/changeset/base/298586
Log:
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
Modified:
head/sys/arm64/include/cpu.h
Modified: head/sys/arm64/include/cpu.h
==============================================================================
--- head/sys/arm64/include/cpu.h Mon Apr 25 17:06:50 2016 (r298585)
+++ head/sys/arm64/include/cpu.h Mon Apr 25 17:32:08 2016 (r298586)
@@ -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)
More information about the svn-src-head
mailing list