From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 19:08:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07B57DD3; Thu, 25 Dec 2014 19:08:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E84101687; Thu, 25 Dec 2014 19:08:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPJ8euk079940; Thu, 25 Dec 2014 19:08:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPJ8ej0079939; Thu, 25 Dec 2014 19:08:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412251908.sBPJ8ej0079939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 25 Dec 2014 19:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276212 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 19:08:41 -0000 Author: ian Date: Thu Dec 25 19:08:39 2014 New Revision: 276212 URL: https://svnweb.freebsd.org/changeset/base/276212 Log: Add macros for asm barrier instructions with arch-specific implementations. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Thu Dec 25 18:22:22 2014 (r276211) +++ head/sys/arm/include/asm.h Thu Dec 25 19:08:39 2014 (r276212) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #define _C_LABEL(x) x #define _ASM_LABEL(x) x @@ -221,4 +222,18 @@ # define RETc(c) mov##c pc, lr #endif +#if __ARM_ARCH >= 7 +#define ISB isb +#define DSB dsb +#define DMB dmb +#elif __ARM_ARCH == 6 +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB +#define DMB mcr CP15_CP15DMB +#else +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB /* DSB and DMB are the */ +#define DMB mcr CP15_CP15DSB /* same prior to v6.*/ +#endif + #endif /* !_MACHINE_ASM_H_ */