From owner-svn-src-all@freebsd.org Thu Aug 13 14:53:30 2015 Return-Path: Delivered-To: svn-src-all@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 C49D29A04D5; Thu, 13 Aug 2015 14:53:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org (repo.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 B57CABF5; Thu, 13 Aug 2015 14:53:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7DErUj4075061; Thu, 13 Aug 2015 14:53:30 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7DErU8a075060; Thu, 13 Aug 2015 14:53:30 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201508131453.t7DErU8a075060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 13 Aug 2015 14:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286726 - head/sys/arm/arm 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.20 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, 13 Aug 2015 14:53:30 -0000 Author: marcel Date: Thu Aug 13 14:53:29 2015 New Revision: 286726 URL: https://svnweb.freebsd.org/changeset/base/286726 Log: Instead of having separate do_sync functions for ARM_ARCH 6 vs. ARM_ARCH >= 7, use the dmb() macro defined in machine/atomic.h Submitted by: Steve Kiernan Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D3355 Modified: head/sys/arm/arm/stdatomic.c Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Thu Aug 13 14:50:11 2015 (r286725) +++ head/sys/arm/arm/stdatomic.c Thu Aug 13 14:53:29 2015 (r286726) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -67,19 +68,12 @@ do_sync(void) __asm volatile ("" : : : "memory"); } -#elif __ARM_ARCH >= 7 -static inline void -do_sync(void) -{ - - __asm volatile ("dmb" : : : "memory"); -} #elif __ARM_ARCH >= 6 static inline void do_sync(void) { - __asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); + dmb(); } #endif