diff options
author | andrew <andrew@FreeBSD.org> | 2016-04-25 17:32:08 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2016-04-25 17:32:08 +0000 |
commit | b40ffdceea7e4c7e883265a00fc36fa28d67bec7 (patch) | |
tree | e4a586535d340fc169ee01a7f5f12457d77cd7dd /sys/arm64 | |
parent | 3f9624c2d6fa37490ee239309298e17530ac9c19 (diff) | |
download | FreeBSD-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.h | 2 |
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) |