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:
parent
92a58a9246
commit
a66dc0c52b
@ -38,7 +38,6 @@
|
||||
|
||||
#include "assym.s"
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/asm.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
|
@ -38,8 +38,6 @@
|
||||
#include <machine/asm.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
.syntax unified
|
||||
.text
|
||||
.align 2
|
||||
|
@ -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"
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
*/
|
||||
|
||||
#include "assym.s"
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/asm.h>
|
||||
#include <machine/armreg.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
@ -28,7 +28,6 @@
|
||||
*/
|
||||
#include "assym.s"
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/asm.h>
|
||||
#include <machine/asmacros.h>
|
||||
#include <machine/armreg.h>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
/*
|
||||
|
@ -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>
|
||||
|
||||
|
@ -48,7 +48,6 @@
|
||||
|
||||
#include "assym.s"
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/asm.h>
|
||||
#include <machine/armreg.h>
|
||||
#include <machine/asmacros.h>
|
||||
|
@ -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>
|
||||
|
@ -33,7 +33,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/asm.h>
|
||||
#include <machine/armreg.h>
|
||||
#include "assym.s"
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -42,8 +42,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <machine/armreg.h>
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <machine/sysarch.h>
|
||||
#else
|
||||
|
@ -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,
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -46,7 +46,6 @@
|
||||
*/
|
||||
|
||||
#include <machine/_align.h>
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
#define STACKALIGNBYTES (8 - 1)
|
||||
#define STACKALIGN(p) ((u_int)(p) & ~STACKALIGNBYTES)
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/cpuconf.h>
|
||||
|
||||
#define ALT_STACK_SIZE 128
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -37,7 +37,6 @@
|
||||
#ifndef _ARM_SYSARCH_H_
|
||||
#define _ARM_SYSARCH_H_
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/armreg.h>
|
||||
|
||||
/*
|
||||
|
@ -39,8 +39,6 @@
|
||||
#ifndef MACHINE_SYSREG_H
|
||||
#define MACHINE_SYSREG_H
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
/*
|
||||
* CP14 registers
|
||||
*/
|
||||
|
@ -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)
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user