Page MenuHomeFreeBSD

D40944.diff
No OneTemporary

D40944.diff

diff --git a/include/Makefile b/include/Makefile
--- a/include/Makefile
+++ b/include/Makefile
@@ -9,7 +9,12 @@
CLEANFILES= osreldate.h version
SUBDIR= arpa protocols rpcsvc rpc xlocale
.if ${MACHINE_CPUARCH} == "amd64"
-SUBDIR+= i386
+SUBDIR+= i386
+INCLUDE_SUBDIRS+= i386
+.endif
+.if ${MACHINE_CPUARCH} == "aarch64"
+SUBDIR+= arm
+INCLUDE_SUBDIRS+= arm
.endif
SUBDIR_PARALLEL=
INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \
@@ -353,10 +358,10 @@
mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \
-f ${SRCTOP}/etc/mtree/BSD.include.dist \
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null
-.if ${MACHINE_CPUARCH} == "amd64"
+.for d in ${INCLUDE_SUBDIRS}
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
- ${SDESTDIR}${INCLUDEDIR}/i386
-.endif
+ ${SDESTDIR}${INCLUDEDIR}/${d}
+.endfor
copies: .PHONY .META
cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \
diff --git a/include/arm/Makefile b/include/arm/Makefile
new file mode 100644
--- /dev/null
+++ b/include/arm/Makefile
@@ -0,0 +1,60 @@
+# arm headers installed on arm64
+
+.PATH: ${SRCTOP}/sys/arm/include ${SRCTOP}/lib/msun/arm
+
+INCS= _align.h \
+ _inttypes.h \
+ _limits.h \
+ _stdint.h \
+ _types.h \
+ acle-compat.h \
+ armreg.h \
+ asm.h \
+ atomic.h \
+ bus.h \
+ counter.h \
+ cpu.h \
+ cpufunc.h \
+ cpuinfo.h \
+ efi.h \
+ elf.h \
+ exec.h \
+ float.h \
+ frame.h \
+ ieeefp.h \
+ param.h \
+ pcb.h \
+ pcpu.h \
+ pmap.h \
+ proc.h \
+ profile.h \
+ pte.h \
+ reg.h \
+ reloc.h \
+ resource.h \
+ runq.h \
+ setjmp.h \
+ signal.h \
+ sysarch.h \
+ sysreg.h \
+ tls.h \
+ ucontext.h \
+ vdso.h \
+ vfp.h \
+ vmparam.h
+# These kernel-only headers are used by procstat's ZFS support.
+# This should be fixed.
+INCS+= pcpu_aux.h \
+ sf_buf.h
+# from lib/msun/arm
+INCS+= fenv.h
+INCSDIR= ${INCLUDEDIR}/arm
+
+beforeinstall: armdir
+META_TARGETS+= armdir
+
+armdir:
+ ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${DESTDIR}${INCLUDEDIR}/arm
+
+.include <bsd.prog.mk>
diff --git a/lib/msun/aarch64/fenv.h b/lib/msun/aarch64/fenv.h
--- a/lib/msun/aarch64/fenv.h
+++ b/lib/msun/aarch64/fenv.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/fenv.h>
+#else /* __arm__ */
+
#ifndef _FENV_H_
#define _FENV_H_
@@ -244,3 +248,5 @@
__END_DECLS
#endif /* !_FENV_H_ */
+
+#endif /* __arm__ */
diff --git a/sys/arm64/include/_align.h b/sys/arm64/include/_align.h
--- a/sys/arm64/include/_align.h
+++ b/sys/arm64/include/_align.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/_align.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE__ALIGN_H_
#define _MACHINE__ALIGN_H_
@@ -42,3 +46,5 @@
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
#endif /* !_MACHINE__ALIGN_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/_inttypes.h b/sys/arm64/include/_inttypes.h
--- a/sys/arm64/include/_inttypes.h
+++ b/sys/arm64/include/_inttypes.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/_inttypes.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE__INTTYPES_H_
#define _MACHINE__INTTYPES_H_
@@ -211,3 +215,5 @@
#define SCNxPTR "lx" /* uintptr_t */
#endif /* !_MACHINE__INTTYPES_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/_limits.h b/sys/arm64/include/_limits.h
--- a/sys/arm64/include/_limits.h
+++ b/sys/arm64/include/_limits.h
@@ -27,6 +27,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/_limits.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
@@ -83,3 +87,5 @@
#define __MINSIGSTKSZ (1024 * 4)
#endif /* !_MACHINE__LIMITS_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/_stdint.h b/sys/arm64/include/_stdint.h
--- a/sys/arm64/include/_stdint.h
+++ b/sys/arm64/include/_stdint.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/_stdint.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE__STDINT_H_
#define _MACHINE__STDINT_H_
@@ -156,3 +160,5 @@
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
#endif /* !_MACHINE__STDINT_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/_types.h b/sys/arm64/include/_types.h
--- a/sys/arm64/include/_types.h
+++ b/sys/arm64/include/_types.h
@@ -32,6 +32,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/_types.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
@@ -67,3 +71,5 @@
#define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */
#endif /* !_MACHINE__TYPES_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/acle-compat.h b/sys/arm64/include/acle-compat.h
new file mode 100644
--- /dev/null
+++ b/sys/arm64/include/acle-compat.h
@@ -0,0 +1,5 @@
+#ifdef __arm__
+#include <arm/acle-compat.h>
+#else /* !__arm__ */
+#error Do not include this header, used only for 32-bit compatibility
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -29,6 +29,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/armreg.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_ARMREG_H_
#define _MACHINE_ARMREG_H_
@@ -1994,3 +1998,5 @@
#define ZCR_LEN_BYTES(x) ((((x) & ZCR_LEN_MASK) + 1) * 16)
#endif /* !_MACHINE_ARMREG_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h
--- a/sys/arm64/include/asm.h
+++ b/sys/arm64/include/asm.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/asm.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_ASM_H_
#define _MACHINE_ASM_H_
@@ -113,3 +117,5 @@
isb
#endif /* _MACHINE_ASM_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/atomic.h b/sys/arm64/include/atomic.h
--- a/sys/arm64/include/atomic.h
+++ b/sys/arm64/include/atomic.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/atomic.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_ATOMIC_H_
#define _MACHINE_ATOMIC_H_
@@ -670,3 +674,5 @@
#endif /* KCSAN && !KCSAN_RUNTIME */
#endif /* _MACHINE_ATOMIC_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/bus.h b/sys/arm64/include/bus.h
--- a/sys/arm64/include/bus.h
+++ b/sys/arm64/include/bus.h
@@ -65,6 +65,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/bus.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_BUS_H_
#define _MACHINE_BUS_H_
@@ -521,3 +525,5 @@
#include <machine/bus_dma.h>
#endif /* _MACHINE_BUS_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/counter.h b/sys/arm64/include/counter.h
--- a/sys/arm64/include/counter.h
+++ b/sys/arm64/include/counter.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/counter.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_COUNTER_H_
#define _MACHINE_COUNTER_H_
@@ -85,3 +89,5 @@
}
#endif /* ! _MACHINE_COUNTER_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -38,6 +38,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/cpu.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_CPU_H_
#define _MACHINE_CPU_H_
@@ -253,3 +257,5 @@
#endif
#endif /* !_MACHINE_CPU_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/cpufunc.h b/sys/arm64/include/cpufunc.h
--- a/sys/arm64/include/cpufunc.h
+++ b/sys/arm64/include/cpufunc.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/cpufunc.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_CPUFUNC_H_
#define _MACHINE_CPUFUNC_H_
@@ -193,3 +197,5 @@
#endif /* _KERNEL */
#endif /* _MACHINE_CPUFUNC_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/cpuinfo.h b/sys/arm64/include/cpuinfo.h
new file mode 100644
--- /dev/null
+++ b/sys/arm64/include/cpuinfo.h
@@ -0,0 +1,5 @@
+#ifdef __arm__
+#include <arm/cpuinfo.h>
+#else /* !__arm__ */
+#error Do not include this header, used only for 32-bit compatibility
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/efi.h b/sys/arm64/include/efi.h
--- a/sys/arm64/include/efi.h
+++ b/sys/arm64/include/efi.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/efi.h>
+#else /* !__arm__ */
+
#ifndef __ARM64_INCLUDE_EFI_H_
#define __ARM64_INCLUDE_EFI_H_
@@ -58,3 +62,5 @@
};
#endif /* __ARM64_INCLUDE_EFI_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/elf.h b/sys/arm64/include/elf.h
--- a/sys/arm64/include/elf.h
+++ b/sys/arm64/include/elf.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/elf.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_ELF_H_
#define _MACHINE_ELF_H_
@@ -180,3 +184,5 @@
#endif
#endif /* !_MACHINE_ELF_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/exec.h b/sys/arm64/include/exec.h
--- a/sys/arm64/include/exec.h
+++ b/sys/arm64/include/exec.h
@@ -1 +1,7 @@
/* $FreeBSD$ */
+
+#ifdef __arm__
+#include <arm/exec.h>
+#else /* !__arm__ */
+/* empty */
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/float.h b/sys/arm64/include/float.h
--- a/sys/arm64/include/float.h
+++ b/sys/arm64/include/float.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/float.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_FLOAT_H_
#define _MACHINE_FLOAT_H_
@@ -92,3 +96,5 @@
#endif /* __ISO_C_VISIBLE >= 2011 */
#endif /* _MACHINE_FLOAT_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/frame.h b/sys/arm64/include/frame.h
--- a/sys/arm64/include/frame.h
+++ b/sys/arm64/include/frame.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/frame.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_FRAME_H_
#define _MACHINE_FRAME_H_
@@ -77,3 +81,5 @@
#endif /* !LOCORE */
#endif /* !_MACHINE_FRAME_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/ieeefp.h b/sys/arm64/include/ieeefp.h
--- a/sys/arm64/include/ieeefp.h
+++ b/sys/arm64/include/ieeefp.h
@@ -4,6 +4,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/ieeefp.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
@@ -41,3 +45,5 @@
__END_DECLS
#endif /* _MACHINE_IEEEFP_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h
--- a/sys/arm64/include/param.h
+++ b/sys/arm64/include/param.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/param.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PARAM_H_
#define _MACHINE_PARAM_H_
@@ -130,3 +134,5 @@
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
#endif /* !_MACHINE_PARAM_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h
--- a/sys/arm64/include/pcb.h
+++ b/sys/arm64/include/pcb.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/pcb.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PCB_H_
#define _MACHINE_PCB_H_
@@ -87,3 +91,5 @@
#endif /* !LOCORE */
#endif /* !_MACHINE_PCB_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/pcpu.h b/sys/arm64/include/pcpu.h
--- a/sys/arm64/include/pcpu.h
+++ b/sys/arm64/include/pcpu.h
@@ -27,6 +27,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/pcpu.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PCPU_H_
#define _MACHINE_PCPU_H_
@@ -89,3 +93,5 @@
#endif /* _KERNEL */
#endif /* !_MACHINE_PCPU_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/pcpu_aux.h b/sys/arm64/include/pcpu_aux.h
--- a/sys/arm64/include/pcpu_aux.h
+++ b/sys/arm64/include/pcpu_aux.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/pcpu_aux.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PCPU_AUX_H_
#define _MACHINE_PCPU_AUX_H_
@@ -50,3 +54,5 @@
extern struct pcpu pcpu0;
#endif /* _MACHINE_PCPU_AUX_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h
--- a/sys/arm64/include/pmap.h
+++ b/sys/arm64/include/pmap.h
@@ -33,6 +33,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/pmap.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PMAP_H_
#define _MACHINE_PMAP_H_
@@ -198,3 +202,5 @@
#endif /* !LOCORE */
#endif /* !_MACHINE_PMAP_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h
--- a/sys/arm64/include/proc.h
+++ b/sys/arm64/include/proc.h
@@ -31,6 +31,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/proc.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PROC_H_
#define _MACHINE_PROC_H_
@@ -75,3 +79,5 @@
#define KINFO_PROC32_SIZE 816
#endif /* !_MACHINE_PROC_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/profile.h b/sys/arm64/include/profile.h
--- a/sys/arm64/include/profile.h
+++ b/sys/arm64/include/profile.h
@@ -31,6 +31,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/profile.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PROFILE_H_
#define _MACHINE_PROFILE_H_
@@ -89,3 +93,5 @@
#endif /* !_KERNEL */
#endif /* !_MACHINE_PROFILE_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/pte.h b/sys/arm64/include/pte.h
--- a/sys/arm64/include/pte.h
+++ b/sys/arm64/include/pte.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/pte.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_PTE_H_
#define _MACHINE_PTE_H_
@@ -188,3 +192,5 @@
#endif /* !_MACHINE_PTE_H_ */
/* End of pte.h */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/reg.h b/sys/arm64/include/reg.h
--- a/sys/arm64/include/reg.h
+++ b/sys/arm64/include/reg.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/reg.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_REG_H_
#define _MACHINE_REG_H_
@@ -91,3 +95,5 @@
#define __HAVE_REG32
#endif /* !_MACHINE_REG_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/reloc.h b/sys/arm64/include/reloc.h
--- a/sys/arm64/include/reloc.h
+++ b/sys/arm64/include/reloc.h
@@ -1 +1,7 @@
/* $FreeBSD$ */
+
+#ifdef __arm__
+#include <arm/reloc.h>
+#else /* !__arm__ */
+/* empty */
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/resource.h b/sys/arm64/include/resource.h
--- a/sys/arm64/include/resource.h
+++ b/sys/arm64/include/resource.h
@@ -29,6 +29,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/resource.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_RESOURCE_H_
#define _MACHINE_RESOURCE_H_ 1
@@ -47,3 +51,5 @@
#endif
#endif /* !_MACHINE_RESOURCE_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/runq.h b/sys/arm64/include/runq.h
--- a/sys/arm64/include/runq.h
+++ b/sys/arm64/include/runq.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/runq.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_RUNQ_H_
#define _MACHINE_RUNQ_H_
@@ -44,3 +48,5 @@
typedef unsigned long rqb_word_t;
#endif
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/setjmp.h b/sys/arm64/include/setjmp.h
--- a/sys/arm64/include/setjmp.h
+++ b/sys/arm64/include/setjmp.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/setjmp.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_SETJMP_H_
#define _MACHINE_SETJMP_H_
@@ -71,3 +75,5 @@
#endif /* __ASSEMBLER__ */
#endif /* !_MACHINE_SETJMP_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/sf_buf.h b/sys/arm64/include/sf_buf.h
--- a/sys/arm64/include/sf_buf.h
+++ b/sys/arm64/include/sf_buf.h
@@ -26,6 +26,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/sf_buf.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_SF_BUF_H_
#define _MACHINE_SF_BUF_H_
@@ -49,3 +53,5 @@
return ((vm_page_t)sf);
}
#endif /* !_MACHINE_SF_BUF_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/signal.h b/sys/arm64/include/signal.h
--- a/sys/arm64/include/signal.h
+++ b/sys/arm64/include/signal.h
@@ -32,6 +32,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/signal.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_SIGNAL_H_
#define _MACHINE_SIGNAL_H_
@@ -48,3 +52,5 @@
#endif
#endif /* !_MACHINE_SIGNAL_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/sysarch.h b/sys/arm64/include/sysarch.h
--- a/sys/arm64/include/sysarch.h
+++ b/sys/arm64/include/sysarch.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/sysarch.h>
+#else /* !__arm__ */
+
/*
* Architecture specific syscalls (arm64)
*/
@@ -45,3 +49,5 @@
#endif
#endif /* !_MACHINE_SYSARCH_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/sysreg.h b/sys/arm64/include/sysreg.h
new file mode 100644
--- /dev/null
+++ b/sys/arm64/include/sysreg.h
@@ -0,0 +1,5 @@
+#ifdef __arm__
+#include <arm/sysreg.h>
+#else /* !__arm__ */
+#error Do not include this header, used only for 32-bit compatibility
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/tls.h b/sys/arm64/include/tls.h
--- a/sys/arm64/include/tls.h
+++ b/sys/arm64/include/tls.h
@@ -28,6 +28,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef __arm__
+#include <arm/tls.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_TLS_H_
#define _MACHINE_TLS_H_
@@ -53,3 +57,5 @@
}
#endif /* !_MACHINE_TLS_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/ucontext.h b/sys/arm64/include/ucontext.h
--- a/sys/arm64/include/ucontext.h
+++ b/sys/arm64/include/ucontext.h
@@ -30,6 +30,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/ucontext.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_UCONTEXT_H_
#define _MACHINE_UCONTEXT_H_
@@ -86,3 +90,5 @@
#endif /* COMPAT_FREEBSD32 */
#endif /* !_MACHINE_UCONTEXT_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/vdso.h b/sys/arm64/include/vdso.h
--- a/sys/arm64/include/vdso.h
+++ b/sys/arm64/include/vdso.h
@@ -25,6 +25,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/vdso.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_VDSO_H_
#define _MACHINE_VDSO_H_
@@ -37,3 +41,5 @@
#define VDSO_TIMEHANDS_MD32 VDSO_TIMEHANDS_MD
#endif /* !_MACHINE_VDSO_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/vfp.h b/sys/arm64/include/vfp.h
--- a/sys/arm64/include/vfp.h
+++ b/sys/arm64/include/vfp.h
@@ -28,6 +28,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/vfp.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_VFP_H_
#define _MACHINE_VFP_H_
@@ -113,3 +117,5 @@
#endif
#endif /* !_MACHINE_VFP_H_ */
+
+#endif /* !__arm__ */
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -36,6 +36,10 @@
* $FreeBSD$
*/
+#ifdef __arm__
+#include <arm/vmparam.h>
+#else /* !__arm__ */
+
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
@@ -275,3 +279,5 @@
#define MINIDUMP_PAGE_TRACKING 1
#endif /* !_MACHINE_VMPARAM_H_ */
+
+#endif /* !__arm__ */

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 6:24 PM (21 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14662745
Default Alt Text
D40944.diff (18 KB)

Event Timeline