From owner-svn-src-head@freebsd.org Mon Apr 25 17:32:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47C0FB1C96D; Mon, 25 Apr 2016 17:32:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEE21F3E; Mon, 25 Apr 2016 17:32:09 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3PHW9VH040661; Mon, 25 Apr 2016 17:32:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3PHW9vI040660; Mon, 25 Apr 2016 17:32:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201604251732.u3PHW9vI040660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Apr 2016 17:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298586 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2016 17:32:10 -0000 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)