From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 03:02:13 2014 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 809B4A71; Wed, 24 Dec 2014 03:02:13 +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 422CDDC2; Wed, 24 Dec 2014 03:02:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBO32D7e030428; Wed, 24 Dec 2014 03:02:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBO32D0T030427; Wed, 24 Dec 2014 03:02:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412240302.sBO32D0T030427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 03:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276165 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 24 Dec 2014 03:02:13 -0000 Author: ian Date: Wed Dec 24 03:02:12 2014 New Revision: 276165 URL: https://svnweb.freebsd.org/changeset/base/276165 Log: Define the old-school arm arch constants we still use internally based on the somewhat newer constants predefined by the compiler. This will allow userland apps to use various machine/foo.h headers without CPUTYPE defined. Modified: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Wed Dec 24 03:00:23 2014 (r276164) +++ head/sys/arm/include/cpuconf.h Wed Dec 24 03:02:12 2014 (r276165) @@ -85,20 +85,43 @@ #endif #if !defined(ARM_ARCH_6) -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) #define ARM_ARCH_6 1 #else #define ARM_ARCH_6 0 #endif #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) #define ARM_ARCH_7A 1 #else #define ARM_ARCH_7A 0 #endif #define ARM_NARCH (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 | ARM_ARCH_7A) + +/* + * Compatibility for userland builds that have no CPUTYPE defined. Use the ARCH + * constants predefined by the compiler to define our old-school arch constants. + * This is a stopgap measure to tide us over until the conversion of all code + * to the newer ACLE constants defined by ARM (see acle-compat.h). + */ +#if ARM_NARCH == 0 +#if defined(__ARM_ARCH_4T__) +#undef ARM_ARCH_4 +#undef ARM_NARCH +#define ARM_ARCH_4 1 +#define ARM_NARCH 1 +#define CPU_ARM9 1 +#elif defined(__ARM_ARCH_6ZK__) +#undef ARM_ARCH_6 +#undef ARM_NARCH +#define ARM_ARCH_6 1 +#define ARM_NARCH 1 +#define CPU_ARM1176 1 +#endif +#endif + #if ARM_NARCH == 0 && !defined(KLD_MODULE) && defined(_KERNEL) #error ARM_NARCH is 0 #endif