1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

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 <machine/acle-compat.h> 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
This commit is contained in:
Ian Lepore 2016-05-25 19:44:26 +00:00
parent 92a58a9246
commit a66dc0c52b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300694
42 changed files with 8 additions and 54 deletions

View File

@ -38,7 +38,6 @@
#include "assym.s"
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <sys/errno.h>

View File

@ -38,8 +38,6 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
#include <machine/acle-compat.h>
.syntax unified
.text
.align 2

View File

@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <machine/bus.h>
#include <machine/acle-compat.h>
#include "opt_platform.h"

View File

@ -39,7 +39,6 @@
*/
#include "assym.s"
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/armreg.h>
__FBSDID("$FreeBSD$");

View File

@ -28,7 +28,6 @@
*/
#include "assym.s"
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/asmacros.h>
#include <machine/armreg.h>

View File

@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/uma.h>
#include <machine/acle-compat.h>
#include <machine/cpuconf.h>
#include <machine/cpufunc.h>

View File

@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <machine/disassem.h>
#include <machine/armreg.h>
#include <machine/acle-compat.h>
#include <ddb/ddb.h>
/*

View File

@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_param.h>
#include <machine/acle-compat.h>
#include <machine/elf.h>
#include <machine/md_var.h>

View File

@ -48,7 +48,6 @@
#include "assym.s"
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/armreg.h>
#include <machine/asmacros.h>

View File

@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <machine/acle-compat.h>
#include <machine/armreg.h>
#include <machine/cpufunc.h>
#include <machine/fiq.h>

View File

@ -33,7 +33,6 @@
*
*/
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/armreg.h>
#include "assym.s"

View File

@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <machine/acle-compat.h>
#include <machine/armreg.h>
#include <machine/frame.h>
#include <machine/pcb.h>

View File

@ -30,7 +30,6 @@
#include "assym.s"
#include <sys/syscall.h>
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/asmacros.h>
#include <machine/armreg.h>

View File

@ -94,7 +94,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <machine/acle-compat.h>
#include <machine/armreg.h>
#include <machine/atags.h>
#include <machine/cpu.h>

View File

@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#include <machine/acle-compat.h>
#include <machine/memdev.h>
#include <machine/vmparam.h>

View File

@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_kern.h>
#include <vm/pmap.h>
#include <machine/acle-compat.h>
#include <machine/armreg.h>
#include <machine/cpu.h>
#include <machine/cpufunc.h>

View File

@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
#include <sys/stdatomic.h>
#include <sys/types.h>
#include <machine/acle-compat.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
#include <machine/sysarch.h>

View File

@ -81,7 +81,6 @@
#include "assym.s"
#include "opt_sched.h"
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/asmacros.h>
#include <machine/armreg.h>

View File

@ -81,7 +81,6 @@
#include "assym.s"
#include "opt_sched.h"
#include <machine/acle-compat.h>
#include <machine/asm.h>
#include <machine/asmacros.h>
#include <machine/armreg.h>

View File

@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <machine/acle-compat.h>
#include <machine/cpu.h>
#include <machine/sysarch.h>
#include <machine/vmparam.h>

View File

@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_extern.h>
#include <vm/vm_param.h>
#include <machine/acle-compat.h>
#include <machine/cpu.h>
#include <machine/frame.h>
#include <machine/machdep.h>

View File

@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sysent.h>
#include <sys/unistd.h>
#include <machine/acle-compat.h>
#include <machine/cpu.h>
#include <machine/frame.h>
#include <machine/pcb.h>
@ -76,7 +75,6 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
#include <vm/uma_int.h>
#include <machine/acle-compat.h>
#include <machine/md_var.h>
#include <machine/vfp.h>

View File

@ -41,8 +41,6 @@
#ifndef MACHINE_ARMREG_H
#define MACHINE_ARMREG_H
#include <machine/acle-compat.h>
#define INSN_SIZE 4
#define INSN_COND_MASK 0xf0000000 /* Condition mask */
#define PSR_MODE 0x0000001f /* mode mask */

View File

@ -39,7 +39,6 @@
#ifndef _MACHINE_ASM_H_
#define _MACHINE_ASM_H_
#include <sys/cdefs.h>
#include <machine/acle-compat.h>
#include <machine/sysreg.h>
#define _C_LABEL(x) x

View File

@ -42,8 +42,6 @@
#include <sys/types.h>
#include <machine/armreg.h>
#include <machine/acle-compat.h>
#ifndef _KERNEL
#include <machine/sysarch.h>
#else

View File

@ -67,7 +67,6 @@
#define _MACHINE_BUS_H_
#include <machine/_bus.h>
#include <machine/acle-compat.h>
/*
* int bus_space_map (bus_space_tag_t t, bus_addr_t addr,

View File

@ -34,7 +34,6 @@
#error Only include this file in the kernel
#endif
#include <machine/acle-compat.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
#include <machine/cpuinfo.h>

View File

@ -34,7 +34,6 @@
#error Only include this file in the kernel
#endif
#include <machine/acle-compat.h>
#include <machine/atomic.h>
#include <machine/cpufunc.h>
#include <machine/cpuinfo.h>

View File

@ -4,7 +4,6 @@
#ifndef MACHINE_CPU_H
#define MACHINE_CPU_H
#include <machine/acle-compat.h>
#include <machine/armreg.h>
#include <machine/frame.h>

View File

@ -33,7 +33,6 @@
#include <machine/frame.h>
#include <machine/trap.h>
#include <machine/armreg.h>
#include <machine/acle-compat.h>
#define T_BREAKPOINT (1)
#define T_WATCHPOINT (2)

View File

@ -4,8 +4,6 @@
#ifndef _MACHDEP_BOOT_MACHDEP_H_
#define _MACHDEP_BOOT_MACHDEP_H_
#include <machine/acle-compat.h>
/* Structs that need to be initialised by initarm */
#if __ARM_ARCH >= 6
extern vm_offset_t irqstack;

View File

@ -46,7 +46,6 @@
*/
#include <machine/_align.h>
#include <machine/acle-compat.h>
#define STACKALIGNBYTES (8 - 1)
#define STACKALIGN(p) ((u_int)(p) & ~STACKALIGNBYTES)

View File

@ -32,7 +32,6 @@
#ifdef _KERNEL
#include <machine/acle-compat.h>
#include <machine/cpuconf.h>
#define ALT_STACK_SIZE 128

View File

@ -30,8 +30,6 @@
#ifndef _MACHINE_PMAP_H_
#define _MACHINE_PMAP_H_
#include <machine/acle-compat.h>
#if __ARM_ARCH >= 6
#include <machine/pmap-v6.h>
#else

View File

@ -29,8 +29,6 @@
#ifndef _MACHINE_SF_BUF_H_
#define _MACHINE_SF_BUF_H_
#include <machine/acle-compat.h>
static inline void
sf_buf_map(struct sf_buf *sf, int flags)
{

View File

@ -37,7 +37,6 @@
#ifndef _ARM_SYSARCH_H_
#define _ARM_SYSARCH_H_
#include <machine/acle-compat.h>
#include <machine/armreg.h>
/*

View File

@ -39,8 +39,6 @@
#ifndef MACHINE_SYSREG_H
#define MACHINE_SYSREG_H
#include <machine/acle-compat.h>
/*
* CP14 registers
*/

View File

@ -29,8 +29,6 @@
#ifndef _MACHINE_VM_H_
#define _MACHINE_VM_H_
#include <machine/acle-compat.h>
#if __ARM_ARCH >= 6
#define VM_MEMATTR_WB_WA ((vm_memattr_t)0)
#define VM_MEMATTR_NOCACHE ((vm_memattr_t)1)

View File

@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/acle-compat.h>
#include <machine/bus.h>
#include <machine/fdt.h>
#include <machine/machdep.h>

View File

@ -80,9 +80,6 @@ __FBSDID("$FreeBSD$");
#include <machine/elf.h>
#include <machine/md_var.h>
#ifdef __arm__
#include <machine/acle-compat.h>
#endif
#define ELF_NOTE_ROUNDSIZE 4
#define OLD_EI_BRAND 8

View File

@ -37,9 +37,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/pmap.h>
#ifdef __arm__
#include <machine/acle-compat.h>
#endif
#include <machine/vmparam.h>
static const struct devmap_entry *devmap_table;

View File

@ -780,6 +780,14 @@
#define __NO_TLS 1
#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 <machine/acle-compat.h>
#endif
/*
* Type Safety Checking
*