@@ -1 +1,9 @@
+#ifndef AARCH64_TARGET_MMAN_H
+#define AARCH64_TARGET_MMAN_H
+
+#define TARGET_PROT_BTI 0x10
+#define TARGET_PROT_MTE 0x20
+
#include "../generic/target_mman.h"
+
+#endif
@@ -23,7 +23,11 @@
#define TARGET_MAP_NORESERVE 0x4000
#endif
-/* Other MAP flags are defined in asm-generic/mman-common.h */
+/* Defined in asm-generic/mman-common.h */
+#ifndef TARGET_PROT_SEM
+#define TARGET_PROT_SEM 0x08
+#endif
+
#ifndef TARGET_MAP_TYPE
#define TARGET_MAP_TYPE 0x0f
#endif
@@ -1,6 +1,8 @@
#ifndef MIPS_TARGET_MMAN_H
#define MIPS_TARGET_MMAN_H
+#define TARGET_PROT_SEM 0x10
+
#define TARGET_MAP_NORESERVE 0x0400
#define TARGET_MAP_ANONYMOUS 0x0800
#define TARGET_MAP_GROWSDOWN 0x1000
@@ -1227,17 +1227,6 @@ struct target_winsize {
#include "termbits.h"
-#if defined(TARGET_MIPS) || defined(TARGET_XTENSA)
-#define TARGET_PROT_SEM 0x10
-#else
-#define TARGET_PROT_SEM 0x08
-#endif
-
-#ifdef TARGET_AARCH64
-#define TARGET_PROT_BTI 0x10
-#define TARGET_PROT_MTE 0x20
-#endif
-
#include "target_mman.h"
#if (defined(TARGET_I386) && defined(TARGET_ABI32)) \
@@ -1,6 +1,8 @@
#ifndef XTENSA_TARGET_MMAN_H
#define XTENSA_TARGET_MMAN_H
+#define TARGET_PROT_SEM 0x10
+
#define TARGET_MAP_NORESERVE 0x0400
#define TARGET_MAP_ANONYMOUS 0x0800
#define TARGET_MAP_GROWSDOWN 0x1000