Date: Mon, 25 Apr 2016 17:32:09 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298586 - head/sys/arm64/include Message-ID: <201604251732.u3PHW9vI040660@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604251732.u3PHW9vI040660>