From owner-svn-src-head@freebsd.org Wed May 25 19:44:31 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 92851B490E5; Wed, 25 May 2016 19:44:31 +0000 (UTC) (envelope-from ian@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 5C1A11DFE; Wed, 25 May 2016 19:44:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4PJiUGC054416; Wed, 25 May 2016 19:44:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4PJiQGq054373; Wed, 25 May 2016 19:44:26 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201605251944.u4PJiQGq054373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 25 May 2016 19:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300694 - in head/sys: arm/arm arm/include arm/mv kern sys 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.22 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, 25 May 2016 19:44:31 -0000 Author: ian Date: Wed May 25 19:44:26 2016 New Revision: 300694 URL: https://svnweb.freebsd.org/changeset/base/300694 Log: Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't have ACLE support built in. The ACLE (ARM C Language Extensions) defines a set of standardized symbols which indicate the architecture version and features available. ACLE support is built in to modern compilers (both clang and gcc), but absent from gcc prior to 4.4. ARM (the company) provides the acle-compat.h header file to define the right symbols for older versions of gcc. Basically, acle-compat.h does for arm about the same thing cdefs.h does for freebsd: defines standardized macros that work no matter which compiler you use. If ARM hadn't provided this file we would have ended up with a big #ifdef __arm__ section in cdefs.h with our own compatibility shims. Remove #include from the zillion other places (an ever-growing list) that it appears. Since style(9) requires sys/types.h or sys/param.h early in the include list, and both of those lead to including cdefs.h, only a couple special cases still need to include acle-compat.h directly. Loves it: imp Modified: head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/bus_space_base.c head/sys/arm/arm/copystr.S head/sys/arm/arm/cpu_asm-v6.S head/sys/arm/arm/cpufunc.c head/sys/arm/arm/disassem.c head/sys/arm/arm/elf_machdep.c head/sys/arm/arm/exception.S head/sys/arm/arm/fiq.c head/sys/arm/arm/fusu.S head/sys/arm/arm/genassym.c head/sys/arm/arm/locore-v6.S head/sys/arm/arm/machdep.c head/sys/arm/arm/mem.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/stdatomic.c head/sys/arm/arm/swtch-v4.S head/sys/arm/arm/swtch-v6.S head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/trap-v6.c head/sys/arm/arm/vm_machdep.c head/sys/arm/include/armreg.h head/sys/arm/include/asm.h head/sys/arm/include/atomic.h head/sys/arm/include/bus.h head/sys/arm/include/cpu-v4.h head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpu.h head/sys/arm/include/db_machdep.h head/sys/arm/include/machdep.h head/sys/arm/include/param.h head/sys/arm/include/pcpu.h head/sys/arm/include/pmap.h head/sys/arm/include/sf_buf.h head/sys/arm/include/sysarch.h head/sys/arm/include/sysreg.h head/sys/arm/include/vm.h head/sys/arm/mv/mv_machdep.c head/sys/kern/imgact_elf.c head/sys/kern/subr_devmap.c head/sys/sys/cdefs.h Modified: head/sys/arm/arm/bcopyinout.S ============================================================================== --- head/sys/arm/arm/bcopyinout.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/bcopyinout.S Wed May 25 19:44:26 2016 (r300694) @@ -38,7 +38,6 @@ #include "assym.s" -#include #include #include Modified: head/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- head/sys/arm/arm/bcopyinout_xscale.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/bcopyinout_xscale.S Wed May 25 19:44:26 2016 (r300694) @@ -38,8 +38,6 @@ #include __FBSDID("$FreeBSD$"); -#include - .syntax unified .text .align 2 Modified: head/sys/arm/arm/bus_space_base.c ============================================================================== --- head/sys/arm/arm/bus_space_base.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/bus_space_base.c Wed May 25 19:44:26 2016 (r300694) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "opt_platform.h" Modified: head/sys/arm/arm/copystr.S ============================================================================== --- head/sys/arm/arm/copystr.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/copystr.S Wed May 25 19:44:26 2016 (r300694) @@ -39,7 +39,6 @@ */ #include "assym.s" -#include #include #include __FBSDID("$FreeBSD$"); Modified: head/sys/arm/arm/cpu_asm-v6.S ============================================================================== --- head/sys/arm/arm/cpu_asm-v6.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/cpu_asm-v6.S Wed May 25 19:44:26 2016 (r300694) @@ -28,7 +28,6 @@ */ #include "assym.s" -#include #include #include #include Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/cpufunc.c Wed May 25 19:44:26 2016 (r300694) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/arm/disassem.c ============================================================================== --- head/sys/arm/arm/disassem.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/disassem.c Wed May 25 19:44:26 2016 (r300694) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/elf_machdep.c Wed May 25 19:44:26 2016 (r300694) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/exception.S Wed May 25 19:44:26 2016 (r300694) @@ -48,7 +48,6 @@ #include "assym.s" -#include #include #include #include Modified: head/sys/arm/arm/fiq.c ============================================================================== --- head/sys/arm/arm/fiq.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/fiq.c Wed May 25 19:44:26 2016 (r300694) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/fusu.S ============================================================================== --- head/sys/arm/arm/fusu.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/fusu.S Wed May 25 19:44:26 2016 (r300694) @@ -33,7 +33,6 @@ * */ -#include #include #include #include "assym.s" Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/genassym.c Wed May 25 19:44:26 2016 (r300694) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/locore-v6.S Wed May 25 19:44:26 2016 (r300694) @@ -30,7 +30,6 @@ #include "assym.s" #include -#include #include #include #include Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/machdep.c Wed May 25 19:44:26 2016 (r300694) @@ -94,7 +94,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/mem.c ============================================================================== --- head/sys/arm/arm/mem.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/mem.c Wed May 25 19:44:26 2016 (r300694) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/mp_machdep.c Wed May 25 19:44:26 2016 (r300694) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/stdatomic.c Wed May 25 19:44:26 2016 (r300694) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/swtch-v4.S ============================================================================== --- head/sys/arm/arm/swtch-v4.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/swtch-v4.S Wed May 25 19:44:26 2016 (r300694) @@ -81,7 +81,6 @@ #include "assym.s" #include "opt_sched.h" -#include #include #include #include Modified: head/sys/arm/arm/swtch-v6.S ============================================================================== --- head/sys/arm/arm/swtch-v6.S Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/swtch-v6.S Wed May 25 19:44:26 2016 (r300694) @@ -81,7 +81,6 @@ #include "assym.s" #include "opt_sched.h" -#include #include #include #include Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/sys_machdep.c Wed May 25 19:44:26 2016 (r300694) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/trap-v6.c Wed May 25 19:44:26 2016 (r300694) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/arm/vm_machdep.c Wed May 25 19:44:26 2016 (r300694) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -76,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/armreg.h Wed May 25 19:44:26 2016 (r300694) @@ -41,8 +41,6 @@ #ifndef MACHINE_ARMREG_H #define MACHINE_ARMREG_H -#include - #define INSN_SIZE 4 #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define PSR_MODE 0x0000001f /* mode mask */ Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/asm.h Wed May 25 19:44:26 2016 (r300694) @@ -39,7 +39,6 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include -#include #include #define _C_LABEL(x) x Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/atomic.h Wed May 25 19:44:26 2016 (r300694) @@ -42,8 +42,6 @@ #include #include -#include - #ifndef _KERNEL #include #else Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/bus.h Wed May 25 19:44:26 2016 (r300694) @@ -67,7 +67,6 @@ #define _MACHINE_BUS_H_ #include -#include /* * int bus_space_map (bus_space_tag_t t, bus_addr_t addr, Modified: head/sys/arm/include/cpu-v4.h ============================================================================== --- head/sys/arm/include/cpu-v4.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/cpu-v4.h Wed May 25 19:44:26 2016 (r300694) @@ -34,7 +34,6 @@ #error Only include this file in the kernel #endif -#include #include #include #include Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/cpu-v6.h Wed May 25 19:44:26 2016 (r300694) @@ -34,7 +34,6 @@ #error Only include this file in the kernel #endif -#include #include #include #include Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/cpu.h Wed May 25 19:44:26 2016 (r300694) @@ -4,7 +4,6 @@ #ifndef MACHINE_CPU_H #define MACHINE_CPU_H -#include #include #include Modified: head/sys/arm/include/db_machdep.h ============================================================================== --- head/sys/arm/include/db_machdep.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/db_machdep.h Wed May 25 19:44:26 2016 (r300694) @@ -33,7 +33,6 @@ #include #include #include -#include #define T_BREAKPOINT (1) #define T_WATCHPOINT (2) Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/machdep.h Wed May 25 19:44:26 2016 (r300694) @@ -4,8 +4,6 @@ #ifndef _MACHDEP_BOOT_MACHDEP_H_ #define _MACHDEP_BOOT_MACHDEP_H_ -#include - /* Structs that need to be initialised by initarm */ #if __ARM_ARCH >= 6 extern vm_offset_t irqstack; Modified: head/sys/arm/include/param.h ============================================================================== --- head/sys/arm/include/param.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/param.h Wed May 25 19:44:26 2016 (r300694) @@ -46,7 +46,6 @@ */ #include -#include #define STACKALIGNBYTES (8 - 1) #define STACKALIGN(p) ((u_int)(p) & ~STACKALIGNBYTES) Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/pcpu.h Wed May 25 19:44:26 2016 (r300694) @@ -32,7 +32,6 @@ #ifdef _KERNEL -#include #include #define ALT_STACK_SIZE 128 Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/pmap.h Wed May 25 19:44:26 2016 (r300694) @@ -30,8 +30,6 @@ #ifndef _MACHINE_PMAP_H_ #define _MACHINE_PMAP_H_ -#include - #if __ARM_ARCH >= 6 #include #else Modified: head/sys/arm/include/sf_buf.h ============================================================================== --- head/sys/arm/include/sf_buf.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/sf_buf.h Wed May 25 19:44:26 2016 (r300694) @@ -29,8 +29,6 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include - static inline void sf_buf_map(struct sf_buf *sf, int flags) { Modified: head/sys/arm/include/sysarch.h ============================================================================== --- head/sys/arm/include/sysarch.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/sysarch.h Wed May 25 19:44:26 2016 (r300694) @@ -37,7 +37,6 @@ #ifndef _ARM_SYSARCH_H_ #define _ARM_SYSARCH_H_ -#include #include /* Modified: head/sys/arm/include/sysreg.h ============================================================================== --- head/sys/arm/include/sysreg.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/sysreg.h Wed May 25 19:44:26 2016 (r300694) @@ -39,8 +39,6 @@ #ifndef MACHINE_SYSREG_H #define MACHINE_SYSREG_H -#include - /* * CP14 registers */ Modified: head/sys/arm/include/vm.h ============================================================================== --- head/sys/arm/include/vm.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/include/vm.h Wed May 25 19:44:26 2016 (r300694) @@ -29,8 +29,6 @@ #ifndef _MACHINE_VM_H_ #define _MACHINE_VM_H_ -#include - #if __ARM_ARCH >= 6 #define VM_MEMATTR_WB_WA ((vm_memattr_t)0) #define VM_MEMATTR_NOCACHE ((vm_memattr_t)1) Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/arm/mv/mv_machdep.c Wed May 25 19:44:26 2016 (r300694) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/kern/imgact_elf.c Wed May 25 19:44:26 2016 (r300694) @@ -80,9 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __arm__ -#include -#endif #define ELF_NOTE_ROUNDSIZE 4 #define OLD_EI_BRAND 8 Modified: head/sys/kern/subr_devmap.c ============================================================================== --- head/sys/kern/subr_devmap.c Wed May 25 19:41:48 2016 (r300693) +++ head/sys/kern/subr_devmap.c Wed May 25 19:44:26 2016 (r300694) @@ -37,9 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __arm__ -#include -#endif #include static const struct devmap_entry *devmap_table; Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed May 25 19:41:48 2016 (r300693) +++ head/sys/sys/cdefs.h Wed May 25 19:44:26 2016 (r300694) @@ -781,6 +781,14 @@ #endif /* + * Old versions of GCC use non-standard ARM arch symbols; acle-compat.h + * translates them to __ARM_ARCH and the modern feature symbols defined by ARM. + */ +#if defined(__arm__) && !defined(__ARM_ARCH) +#include +#endif + +/* * Type Safety Checking * * Clang provides additional attributes to enable checking type safety