aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2020-04-14 20:30:48 +0000
committerBrooks Davis <brooks@FreeBSD.org>2020-04-14 20:30:48 +0000
commit562894f0dc310f658284863ff329906e7737a0a0 (patch)
tree8a830d5373ca9ce37e8d766441703236d0240ae9 /sys/arm64
parentc23ca622a27cac1c9391d81c50342d091c1d3b63 (diff)
downloadsrc-562894f0dc310f658284863ff329906e7737a0a0.tar.gz
src-562894f0dc310f658284863ff329906e7737a0a0.zip
Centralize compatability translation macros.
Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h and replace existing definitation with includes where required. This eliminates duplicate code and allows Linux and FreeBSD compatability headers to be included in the same files. Input from: cem, jhb Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24275
Notes
Notes: svn path=/head/; revision=359937
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/linux/linux.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h
index 69be1f0a0aa4..3aecc9b94ce7 100644
--- a/sys/arm64/linux/linux.h
+++ b/sys/arm64/linux/linux.h
@@ -31,19 +31,13 @@
#ifndef _ARM64_LINUX_H_
#define _ARM64_LINUX_H_
+#include <sys/abi_compat.h>
+
#include <compat/linux/linux.h>
#include <arm64/linux/linux_syscall.h>
#define LINUX_DTRACE linuxulator
-#define PTRIN(v) (void *)(v)
-#define PTROUT(v) (uintptr_t)(v)
-
-#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0)
-#define CP2(src,dst,sfld,dfld) do { (dst).dfld = (src).sfld; } while (0)
-#define PTRIN_CP(src,dst,fld) \
- do { (dst).fld = PTRIN((src).fld); } while (0)
-
/* Provide a separate set of types for the Linux types */
typedef int32_t l_int;
typedef int64_t l_long;