From: Arnd Bergmann <arnd@xxxxxxxx>
mips and xtensa have almost the same asm/mman.h, aside from an
unintentional difference in MAP_UNINITIALIZED that has no effect in
practice.
Now that the MAP_* flags are moved out of asm-generic/mman-common.h,
the only difference from the its contents and the mips/xtensa version
is the PROT_SEM definition that is one bit off from the rest.
Make the generic PROT_SEM definition conditional on it already being
defined and then include that header from both architectures, to
remove the bulk of the contents.
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
arch/alpha/include/uapi/asm/mman.h | 2 +
arch/mips/include/uapi/asm/mman.h | 65 +------------------------
arch/parisc/include/uapi/asm/mman.h | 3 ++
arch/xtensa/include/uapi/asm/mman.h | 66 +-------------------------
include/uapi/asm-generic/mman-common.h | 2 +
5 files changed, 9 insertions(+), 129 deletions(-)
diff --git a/arch/alpha/include/uapi/asm/mman.h b/arch/alpha/include/uapi/asm/mman.h
index 8946a13ce858..1f1c03c047ce 100644
--- a/arch/alpha/include/uapi/asm/mman.h
+++ b/arch/alpha/include/uapi/asm/mman.h
@@ -5,7 +5,9 @@
#define PROT_READ 0x1 /* page can be read */
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
+#ifndef PROT_SEM /* different on mips and xtensa */
#define PROT_SEM 0x8 /* page may be used for atomic ops */
+#endif
--- a/include/uapi/asm-generic/mman-common.h... only conditional here in asm-generic.
+++ b/include/uapi/asm-generic/mman-common.h
@@ -10,7 +10,9 @@
#define PROT_READ 0x1 /* page can be read */
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
+#ifndef PROT_SEM /* different on mips and xtensa */
#define PROT_SEM 0x8 /* page may be used for atomic ops */
+#endif