@@ -5,6 +5,7 @@
#define MADV_DONTDUMP 16
#define MADV_DONTFORK 10
#define MADV_DONTNEED 6
+#define MADV_FREE 8
#define MADV_HUGEPAGE 14
#define MADV_MERGEABLE 12
#define MADV_NOHUGEPAGE 15
@@ -35,4 +36,12 @@
#define PROT_READ 0x1
#define PROT_SEM 0x8
#define PROT_WRITE 0x2
+/* MADV_HWPOISON is undefined on alpha, fix it for perf */
+#define MADV_HWPOISON 100
+/* MADV_SOFT_OFFLINE is undefined on alpha, fix it for perf */
+#define MADV_SOFT_OFFLINE 101
+/* MAP_32BIT is undefined on alpha, fix it for perf */
+#define MAP_32BIT 0
+/* MAP_UNINITIALIZED is undefined on alpha, fix it for perf */
+#define MAP_UNINITIALIZED 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on arc, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on arm, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on arm64, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on frv, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on h8300, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on hexagon, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on ia64, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on m32r, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on microblaze, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -5,6 +5,7 @@
#define MADV_DONTDUMP 16
#define MADV_DONTFORK 10
#define MADV_DONTNEED 4
+#define MADV_FREE 8
#define MADV_HUGEPAGE 14
#define MADV_HWPOISON 100
#define MADV_MERGEABLE 12
@@ -36,4 +37,10 @@
#define PROT_READ 0x01
#define PROT_SEM 0x10
#define PROT_WRITE 0x02
+/* MADV_SOFT_OFFLINE is undefined on mips, fix it for perf */
+#define MADV_SOFT_OFFLINE 101
+/* MAP_32BIT is undefined on mips, fix it for perf */
+#define MAP_32BIT 0
+/* MAP_UNINITIALIZED is undefined on mips, fix it for perf */
+#define MAP_UNINITIALIZED 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on mn10300, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -5,6 +5,7 @@
#define MADV_DONTDUMP 69
#define MADV_DONTFORK 10
#define MADV_DONTNEED 4
+#define MADV_FREE 8
#define MADV_HUGEPAGE 67
#define MADV_MERGEABLE 65
#define MADV_NOHUGEPAGE 68
@@ -35,4 +36,12 @@
#define PROT_READ 0x1
#define PROT_SEM 0x8
#define PROT_WRITE 0x2
+/* MADV_HWPOISON is undefined on parisc, fix it for perf */
+#define MADV_HWPOISON 100
+/* MADV_SOFT_OFFLINE is undefined on parisc, fix it for perf */
+#define MADV_SOFT_OFFLINE 101
+/* MAP_32BIT is undefined on parisc, fix it for perf */
+#define MAP_32BIT 0
+/* MAP_UNINITIALIZED is undefined on parisc, fix it for perf */
+#define MAP_UNINITIALIZED 0
#endif
@@ -10,4 +10,6 @@
#define MAP_POPULATE 0x8000
#define MAP_STACK 0x20000
#include <uapi/asm-generic/mman-common.h>
+/* MAP_32BIT is undefined on powerpc, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on s390, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on score, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -1,4 +1,6 @@
#ifndef TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
#define TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
#include <uapi/asm-generic/mman.h>
+/* MAP_32BIT is undefined on sh, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -10,4 +10,6 @@
#define MAP_POPULATE 0x8000
#define MAP_STACK 0x20000
#include <uapi/asm-generic/mman-common.h>
+/* MAP_32BIT is undefined on sparc, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -10,4 +10,6 @@
#define MAP_POPULATE 0x0040
#define MAP_STACK MAP_GROWSDOWN
#include <uapi/asm-generic/mman-common.h>
+/* MAP_32BIT is undefined on tile, fix it for perf */
+#define MAP_32BIT 0
#endif
@@ -5,6 +5,7 @@
#define MADV_DONTDUMP 16
#define MADV_DONTFORK 10
#define MADV_DONTNEED 4
+#define MADV_FREE 8
#define MADV_HUGEPAGE 14
#define MADV_MERGEABLE 12
#define MADV_NOHUGEPAGE 15
@@ -35,4 +36,12 @@
#define PROT_READ 0x1
#define PROT_SEM 0x10
#define PROT_WRITE 0x2
+/* MADV_HWPOISON is undefined on xtensa, fix it for perf */
+#define MADV_HWPOISON 100
+/* MADV_SOFT_OFFLINE is undefined on xtensa, fix it for perf */
+#define MADV_SOFT_OFFLINE 101
+/* MAP_32BIT is undefined on xtensa, fix it for perf */
+#define MAP_32BIT 0
+/* MAP_UNINITIALIZED is undefined on xtensa, fix it for perf */
+#define MAP_UNINITIALIZED 0
#endif