aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-xtensa/mman.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-02-15 18:17:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-15 18:32:22 -0500
commit5f6164f3092832e0d9b12eed52e09a76bf39c64a (patch)
tree507043c3eafa00ad7241f1102c860e486f8dc544 /include/asm-xtensa/mman.h
parent06fed33849c13af637c4d09e9ba27828fac9edd5 (diff)
[PATCH] add asm-generic/mman.h
Make new MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK consistent across all arches. The idea is to make it possible to use them portably even before distros include them in libc headers. Move common flags to asm-generic/mman.h Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-xtensa/mman.h')
-rw-r--r--include/asm-xtensa/mman.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h
index e2d7afb679c8..ba394cbb4807 100644
--- a/include/asm-xtensa/mman.h
+++ b/include/asm-xtensa/mman.h
@@ -67,17 +67,19 @@
67#define MCL_CURRENT 1 /* lock all current mappings */ 67#define MCL_CURRENT 1 /* lock all current mappings */
68#define MCL_FUTURE 2 /* lock all future mappings */ 68#define MCL_FUTURE 2 /* lock all future mappings */
69 69
70#define MADV_NORMAL 0x0 /* default page-in behavior */ 70#define MADV_NORMAL 0 /* no further special treatment */
71#define MADV_RANDOM 0x1 /* page-in minimum required */ 71#define MADV_RANDOM 1 /* expect random page references */
72#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ 72#define MADV_SEQUENTIAL 2 /* expect sequential page references */
73#define MADV_WILLNEED 0x3 /* pre-fault pages */ 73#define MADV_WILLNEED 3 /* will need these pages */
74#define MADV_DONTNEED 0x4 /* discard these pages */ 74#define MADV_DONTNEED 4 /* don't need these pages */
75#define MADV_REMOVE 0x5 /* remove these pages & resources */ 75
76#define MADV_DONTFORK 0x30 /* dont inherit across fork */ 76/* common parameters: try to keep these consistent across architectures */
77#define MADV_DOFORK 0x31 /* do inherit across fork */ 77#define MADV_REMOVE 9 /* remove these pages & resources */
78#define MADV_DONTFORK 10 /* don't inherit across fork */
79#define MADV_DOFORK 11 /* do inherit across fork */
78 80
79/* compatibility flags */ 81/* compatibility flags */
80#define MAP_ANON MAP_ANONYMOUS 82#define MAP_ANON MAP_ANONYMOUS
81#define MAP_FILE 0 83#define MAP_FILE 0
82 84
83#endif /* _XTENSA_MMAN_H */ 85#endif /* _XTENSA_MMAN_H */