From owner-svn-src-head@FreeBSD.ORG Mon May 11 08:57:24 2015 Return-Path: Delivered-To: svn-src-head@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 BA0FE971; Mon, 11 May 2015 08:57:24 +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 A8AEF12AF; Mon, 11 May 2015 08:57:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8vOii018939; Mon, 11 May 2015 08:57:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8vOZr018937; Mon, 11 May 2015 08:57:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505110857.t4B8vOZr018937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 08:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282763 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 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, 11 May 2015 08:57:24 -0000 Author: andrew Date: Mon May 11 08:57:23 2015 New Revision: 282763 URL: https://svnweb.freebsd.org/changeset/base/282763 Log: Move to use __ARM_ARCH in more places in the kernel. Modified: head/sys/arm/arm/fusu.S head/sys/arm/arm/stdatomic.c Modified: head/sys/arm/arm/fusu.S ============================================================================== --- head/sys/arm/arm/fusu.S Mon May 11 08:51:24 2015 (r282762) +++ head/sys/arm/arm/fusu.S Mon May 11 08:57:23 2015 (r282763) @@ -33,6 +33,7 @@ * */ +#include #include #include #include "assym.s" @@ -40,7 +41,7 @@ __FBSDID("$FreeBSD$"); .syntax unified -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ add tmp, tmp, #(TD_PCB) @@ -68,7 +69,7 @@ EENTRY_NP(casuword32) stmfd sp!, {r4, r5} adr r4, .Lcasuwordfault str r4, [r3, #PCB_ONFAULT] -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 1: cmp r0, #KERNBASE mvnhs r0, #0 Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Mon May 11 08:51:24 2015 (r282762) +++ head/sys/arm/arm/stdatomic.c Mon May 11 08:57:23 2015 (r282763) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -66,16 +67,14 @@ do_sync(void) __asm volatile ("" : : : "memory"); } -#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +#elif __ARM_ARCH >= 7 static inline void do_sync(void) { __asm volatile ("dmb" : : : "memory"); } -#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6ZK__) +#elif __ARM_ARCH >= 6 static inline void do_sync(void) { @@ -90,14 +89,8 @@ do_sync(void) * New C11 __atomic_* API. */ -#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6ZK__) || \ - defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) - -/* These systems should be supported by the compiler. */ - -#else /* __ARM_ARCH_5__ */ +/* ARMv6+ systems should be supported by the compiler. */ +#if __ARM_ARCH <= 5 /* Clang doesn't allow us to reimplement builtins without this. */ #ifdef __clang__ @@ -331,7 +324,7 @@ EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str" #endif /* _KERNEL */ -#endif +#endif /* __ARM_ARCH */ #endif /* __CLANG_ATOMICS || __GNUC_ATOMICS */ @@ -365,10 +358,7 @@ EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str" * Old __sync_* API. */ -#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6ZK__) || \ - defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +#if __ARM_ARCH >= 6 /* Implementations for old GCC versions, lacking support for atomics. */ @@ -686,7 +676,7 @@ __strong_reference(__sync_fetch_and_xor_ __strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); #endif -#else /* __ARM_ARCH_5__ */ +#else /* __ARM_ARCH < 6 */ #ifdef _KERNEL @@ -881,7 +871,7 @@ __strong_reference(__sync_fetch_and_or_4 __strong_reference(__sync_fetch_and_xor_1_c, __sync_fetch_and_xor_1); __strong_reference(__sync_fetch_and_xor_2_c, __sync_fetch_and_xor_2); __strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); -#endif +#endif /* __ARM_ARCH */ #endif /* _KERNEL */