diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/mman.h | 8 | ||||
-rw-r--r-- | include/asm-arm/mman.h | 31 | ||||
-rw-r--r-- | include/asm-arm26/mman.h | 31 | ||||
-rw-r--r-- | include/asm-cris/mman.h | 31 | ||||
-rw-r--r-- | include/asm-frv/mman.h | 31 | ||||
-rw-r--r-- | include/asm-generic/mman.h | 42 | ||||
-rw-r--r-- | include/asm-h8300/mman.h | 31 | ||||
-rw-r--r-- | include/asm-i386/mman.h | 31 | ||||
-rw-r--r-- | include/asm-ia64/mman.h | 31 | ||||
-rw-r--r-- | include/asm-m32r/mman.h | 33 | ||||
-rw-r--r-- | include/asm-m68k/mman.h | 31 | ||||
-rw-r--r-- | include/asm-mips/mman.h | 22 | ||||
-rw-r--r-- | include/asm-parisc/mman.h | 8 | ||||
-rw-r--r-- | include/asm-powerpc/mman.h | 32 | ||||
-rw-r--r-- | include/asm-s390/mman.h | 31 | ||||
-rw-r--r-- | include/asm-sh/mman.h | 31 | ||||
-rw-r--r-- | include/asm-sparc/mman.h | 31 | ||||
-rw-r--r-- | include/asm-sparc64/mman.h | 31 | ||||
-rw-r--r-- | include/asm-v850/mman.h | 30 | ||||
-rw-r--r-- | include/asm-x86_64/mman.h | 30 | ||||
-rw-r--r-- | include/asm-xtensa/mman.h | 22 |
21 files changed, 96 insertions, 503 deletions
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index a21515c16a43..5f24c755f577 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h | |||
@@ -42,9 +42,11 @@ | |||
42 | #define MADV_WILLNEED 3 /* will need these pages */ | 42 | #define MADV_WILLNEED 3 /* will need these pages */ |
43 | #define MADV_SPACEAVAIL 5 /* ensure resources are available */ | 43 | #define MADV_SPACEAVAIL 5 /* ensure resources are available */ |
44 | #define MADV_DONTNEED 6 /* don't need these pages */ | 44 | #define MADV_DONTNEED 6 /* don't need these pages */ |
45 | #define MADV_REMOVE 7 /* remove these pages & resources */ | 45 | |
46 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | 46 | /* common/generic parameters */ |
47 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | 47 | #define MADV_REMOVE 9 /* remove these pages & resources */ |
48 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
49 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
48 | 50 | ||
49 | /* compatibility flags */ | 51 | /* compatibility flags */ |
50 | #define MAP_ANON MAP_ANONYMOUS | 52 | #define MAP_ANON MAP_ANONYMOUS |
diff --git a/include/asm-arm/mman.h b/include/asm-arm/mman.h index 693ed859e632..54570d2e95b7 100644 --- a/include/asm-arm/mman.h +++ b/include/asm-arm/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,24 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __ARM_MMAN_H__ */ | 17 | #endif /* __ARM_MMAN_H__ */ |
diff --git a/include/asm-arm26/mman.h b/include/asm-arm26/mman.h index 2096c50df888..4000a6c1b76b 100644 --- a/include/asm-arm26/mman.h +++ b/include/asm-arm26/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,24 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __ARM_MMAN_H__ */ | 17 | #endif /* __ARM_MMAN_H__ */ |
diff --git a/include/asm-cris/mman.h b/include/asm-cris/mman.h index deddfb239ff5..1c35e1b66b46 100644 --- a/include/asm-cris/mman.h +++ b/include/asm-cris/mman.h | |||
@@ -3,19 +3,7 @@ | |||
3 | 3 | ||
4 | /* verbatim copy of asm-i386/ version */ | 4 | /* verbatim copy of asm-i386/ version */ |
5 | 5 | ||
6 | #define PROT_READ 0x1 /* page can be read */ | 6 | #include <asm-generic/mman.h> |
7 | #define PROT_WRITE 0x2 /* page can be written */ | ||
8 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
9 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
10 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
11 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
12 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
13 | |||
14 | #define MAP_SHARED 0x01 /* Share changes */ | ||
15 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
16 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
17 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
18 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
19 | 7 | ||
20 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
21 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -25,24 +13,7 @@ | |||
25 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
26 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
27 | 15 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
33 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
34 | 18 | ||
35 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
36 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
37 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
38 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
39 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
40 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
41 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
42 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
43 | |||
44 | /* compatibility flags */ | ||
45 | #define MAP_ANON MAP_ANONYMOUS | ||
46 | #define MAP_FILE 0 | ||
47 | |||
48 | #endif /* __CRIS_MMAN_H__ */ | 19 | #endif /* __CRIS_MMAN_H__ */ |
diff --git a/include/asm-frv/mman.h b/include/asm-frv/mman.h index d3bca306da82..b4371e928683 100644 --- a/include/asm-frv/mman.h +++ b/include/asm-frv/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ASM_MMAN_H__ | 1 | #ifndef __ASM_MMAN_H__ |
2 | #define __ASM_MMAN_H__ | 2 | #define __ASM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,25 +11,8 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __ASM_MMAN_H__ */ | 17 | #endif /* __ASM_MMAN_H__ */ |
47 | 18 | ||
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h new file mode 100644 index 000000000000..3b41d2bb70da --- /dev/null +++ b/include/asm-generic/mman.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef _ASM_GENERIC_MMAN_H | ||
2 | #define _ASM_GENERIC_MMAN_H | ||
3 | |||
4 | /* | ||
5 | Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd. | ||
6 | Based on: asm-xxx/mman.h | ||
7 | */ | ||
8 | |||
9 | #define PROT_READ 0x1 /* page can be read */ | ||
10 | #define PROT_WRITE 0x2 /* page can be written */ | ||
11 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
12 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
13 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
14 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
15 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
16 | |||
17 | #define MAP_SHARED 0x01 /* Share changes */ | ||
18 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
21 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
22 | |||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
25 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
26 | |||
27 | #define MADV_NORMAL 0 /* no further special treatment */ | ||
28 | #define MADV_RANDOM 1 /* expect random page references */ | ||
29 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ | ||
30 | #define MADV_WILLNEED 3 /* will need these pages */ | ||
31 | #define MADV_DONTNEED 4 /* don't need these pages */ | ||
32 | |||
33 | /* common parameters: try to keep these consistent across architectures */ | ||
34 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
37 | |||
38 | /* compatibility flags */ | ||
39 | #define MAP_ANON MAP_ANONYMOUS | ||
40 | #define MAP_FILE 0 | ||
41 | |||
42 | #endif | ||
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h index ac0346f7d11d..b9f104f22a36 100644 --- a/include/asm-h8300/mman.h +++ b/include/asm-h8300/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __H8300_MMAN_H__ | 1 | #ifndef __H8300_MMAN_H__ |
2 | #define __H8300_MMAN_H__ | 2 | #define __H8300_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,24 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __H8300_MMAN_H__ */ | 17 | #endif /* __H8300_MMAN_H__ */ |
diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h index ab2339a1d807..8fd9d7ab7faf 100644 --- a/include/asm-i386/mman.h +++ b/include/asm-i386/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __I386_MMAN_H__ | 1 | #ifndef __I386_MMAN_H__ |
2 | #define __I386_MMAN_H__ | 2 | #define __I386_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,24 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __I386_MMAN_H__ */ | 17 | #endif /* __I386_MMAN_H__ */ |
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index 357ebb780cc0..6ba179f12718 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h | |||
@@ -8,19 +8,7 @@ | |||
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define PROT_READ 0x1 /* page can be read */ | 11 | #include <asm-generic/mman.h> |
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | 12 | ||
25 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ | 13 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ |
26 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ | 14 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ |
@@ -31,24 +19,7 @@ | |||
31 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ | 19 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ |
32 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
33 | 21 | ||
34 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
35 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
36 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
37 | |||
38 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
39 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
40 | 24 | ||
41 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
42 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
43 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
44 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
45 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
46 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
47 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
48 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
49 | |||
50 | /* compatibility flags */ | ||
51 | #define MAP_ANON MAP_ANONYMOUS | ||
52 | #define MAP_FILE 0 | ||
53 | |||
54 | #endif /* _ASM_IA64_MMAN_H */ | 25 | #endif /* _ASM_IA64_MMAN_H */ |
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 6b02fe3fcff2..695a860c024f 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h | |||
@@ -1,21 +1,9 @@ | |||
1 | #ifndef __M32R_MMAN_H__ | 1 | #ifndef __M32R_MMAN_H__ |
2 | #define __M32R_MMAN_H__ | 2 | #define __M32R_MMAN_H__ |
3 | 3 | ||
4 | /* orig : i386 2.6.0-test6 */ | 4 | #include <asm-generic/mman.h> |
5 | |||
6 | #define PROT_READ 0x1 /* page can be read */ | ||
7 | #define PROT_WRITE 0x2 /* page can be written */ | ||
8 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
9 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
10 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
11 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
12 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
13 | 5 | ||
14 | #define MAP_SHARED 0x01 /* Share changes */ | 6 | /* orig : i386 2.6.0-test6 */ |
15 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
16 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
17 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
18 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
19 | 7 | ||
20 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
21 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -25,24 +13,7 @@ | |||
25 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
26 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
27 | 15 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
33 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
34 | 18 | ||
35 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
36 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
37 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
38 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
39 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
40 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
41 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
42 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
43 | |||
44 | /* compatibility flags */ | ||
45 | #define MAP_ANON MAP_ANONYMOUS | ||
46 | #define MAP_FILE 0 | ||
47 | |||
48 | #endif /* __M32R_MMAN_H__ */ | 19 | #endif /* __M32R_MMAN_H__ */ |
diff --git a/include/asm-m68k/mman.h b/include/asm-m68k/mman.h index efd12bc4ccb7..1626d37f4898 100644 --- a/include/asm-m68k/mman.h +++ b/include/asm-m68k/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __M68K_MMAN_H__ | 1 | #ifndef __M68K_MMAN_H__ |
2 | #define __M68K_MMAN_H__ | 2 | #define __M68K_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,24 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __M68K_MMAN_H__ */ | 17 | #endif /* __M68K_MMAN_H__ */ |
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 6d01e26830fa..046cf686bee7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -60,17 +60,19 @@ | |||
60 | #define MCL_CURRENT 1 /* lock all current mappings */ | 60 | #define MCL_CURRENT 1 /* lock all current mappings */ |
61 | #define MCL_FUTURE 2 /* lock all future mappings */ | 61 | #define MCL_FUTURE 2 /* lock all future mappings */ |
62 | 62 | ||
63 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | 63 | #define MADV_NORMAL 0 /* no further special treatment */ |
64 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | 64 | #define MADV_RANDOM 1 /* expect random page references */ |
65 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | 65 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
66 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | 66 | #define MADV_WILLNEED 3 /* will need these pages */ |
67 | #define MADV_DONTNEED 0x4 /* discard these pages */ | 67 | #define MADV_DONTNEED 4 /* don't need these pages */ |
68 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | 68 | |
69 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | 69 | /* common parameters: try to keep these consistent across architectures */ |
70 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | 70 | #define MADV_REMOVE 9 /* remove these pages & resources */ |
71 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
71 | 73 | ||
72 | /* compatibility flags */ | 74 | /* compatibility flags */ |
73 | #define MAP_ANON MAP_ANONYMOUS | 75 | #define MAP_ANON MAP_ANONYMOUS |
74 | #define MAP_FILE 0 | 76 | #define MAP_FILE 0 |
75 | 77 | ||
76 | #endif /* _ASM_MMAN_H */ | 78 | #endif /* _ASM_MMAN_H */ |
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index a381cf5c8f55..0ef15ee0f17e 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h | |||
@@ -38,7 +38,11 @@ | |||
38 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ | 38 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ |
39 | #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ | 39 | #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ |
40 | #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ | 40 | #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ |
41 | #define MADV_REMOVE 8 /* remove these pages & resources */ | 41 | |
42 | /* common/generic parameters */ | ||
43 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
44 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
45 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
42 | 46 | ||
43 | /* The range 12-64 is reserved for page size specification. */ | 47 | /* The range 12-64 is reserved for page size specification. */ |
44 | #define MADV_4K_PAGES 12 /* Use 4K pages */ | 48 | #define MADV_4K_PAGES 12 /* Use 4K pages */ |
@@ -49,8 +53,6 @@ | |||
49 | #define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */ | 53 | #define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */ |
50 | #define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ | 54 | #define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */ |
51 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ | 55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ |
52 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
53 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
54 | 56 | ||
55 | /* compatibility flags */ | 57 | /* compatibility flags */ |
56 | #define MAP_ANON MAP_ANONYMOUS | 58 | #define MAP_ANON MAP_ANONYMOUS |
diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h index fcff25d13f13..24cf664a8295 100644 --- a/include/asm-powerpc/mman.h +++ b/include/asm-powerpc/mman.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_POWERPC_MMAN_H | 1 | #ifndef _ASM_POWERPC_MMAN_H |
2 | #define _ASM_POWERPC_MMAN_H | 2 | #define _ASM_POWERPC_MMAN_H |
3 | 3 | ||
4 | #include <asm-generic/mman.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -8,19 +10,6 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
9 | */ | 11 | */ |
10 | 12 | ||
11 | #define PROT_READ 0x1 /* page can be read */ | ||
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 13 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
25 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 14 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
26 | #define MAP_LOCKED 0x80 | 15 | #define MAP_LOCKED 0x80 |
@@ -29,27 +18,10 @@ | |||
29 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 18 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
30 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 19 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
31 | 20 | ||
32 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
33 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
34 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
35 | |||
36 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 21 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
37 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 22 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
38 | 23 | ||
39 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
40 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
41 | 26 | ||
42 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
43 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
44 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
45 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
46 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
47 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
48 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
49 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
50 | |||
51 | /* compatibility flags */ | ||
52 | #define MAP_ANON MAP_ANONYMOUS | ||
53 | #define MAP_FILE 0 | ||
54 | |||
55 | #endif /* _ASM_POWERPC_MMAN_H */ | 27 | #endif /* _ASM_POWERPC_MMAN_H */ |
diff --git a/include/asm-s390/mman.h b/include/asm-s390/mman.h index d41ca1477010..7839767d837e 100644 --- a/include/asm-s390/mman.h +++ b/include/asm-s390/mman.h | |||
@@ -9,19 +9,7 @@ | |||
9 | #ifndef __S390_MMAN_H__ | 9 | #ifndef __S390_MMAN_H__ |
10 | #define __S390_MMAN_H__ | 10 | #define __S390_MMAN_H__ |
11 | 11 | ||
12 | #define PROT_READ 0x1 /* page can be read */ | 12 | #include <asm-generic/mman.h> |
13 | #define PROT_WRITE 0x2 /* page can be written */ | ||
14 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
15 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
16 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
17 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
18 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
19 | |||
20 | #define MAP_SHARED 0x01 /* Share changes */ | ||
21 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
22 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
23 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
24 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
25 | 13 | ||
26 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 14 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -31,24 +19,7 @@ | |||
31 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 19 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
32 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
33 | 21 | ||
34 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
35 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
36 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
37 | |||
38 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
39 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
40 | 24 | ||
41 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
42 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
43 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
44 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
45 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
46 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
47 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
48 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
49 | |||
50 | /* compatibility flags */ | ||
51 | #define MAP_ANON MAP_ANONYMOUS | ||
52 | #define MAP_FILE 0 | ||
53 | |||
54 | #endif /* __S390_MMAN_H__ */ | 25 | #endif /* __S390_MMAN_H__ */ |
diff --git a/include/asm-sh/mman.h b/include/asm-sh/mman.h index 0e08d0573abc..156eb0225cf6 100644 --- a/include/asm-sh/mman.h +++ b/include/asm-sh/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ASM_SH_MMAN_H | 1 | #ifndef __ASM_SH_MMAN_H |
2 | #define __ASM_SH_MMAN_H | 2 | #define __ASM_SH_MMAN_H |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,24 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
40 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __ASM_SH_MMAN_H */ | 17 | #endif /* __ASM_SH_MMAN_H */ |
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 4a298b2be859..88d1886abf3b 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h | |||
@@ -2,21 +2,10 @@ | |||
2 | #ifndef __SPARC_MMAN_H__ | 2 | #ifndef __SPARC_MMAN_H__ |
3 | #define __SPARC_MMAN_H__ | 3 | #define __SPARC_MMAN_H__ |
4 | 4 | ||
5 | /* SunOS'ified... */ | 5 | #include <asm-generic/mman.h> |
6 | 6 | ||
7 | #define PROT_READ 0x1 /* page can be read */ | 7 | /* SunOS'ified... */ |
8 | #define PROT_WRITE 0x2 /* page can be written */ | ||
9 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
10 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
11 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
12 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
13 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
14 | 8 | ||
15 | #define MAP_SHARED 0x01 /* Share changes */ | ||
16 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
17 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
18 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
19 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
20 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 9 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
21 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 10 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
22 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | 11 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ |
@@ -27,10 +16,6 @@ | |||
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
28 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
29 | 18 | ||
30 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
31 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
32 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
33 | |||
34 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 19 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
35 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 20 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
36 | 21 | ||
@@ -48,18 +33,6 @@ | |||
48 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ | 33 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ |
49 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ | 34 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ |
50 | 35 | ||
51 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
52 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
53 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
54 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
55 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
56 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
57 | #define MADV_REMOVE 0x6 /* remove these pages & resources */ | ||
58 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
59 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
60 | |||
61 | /* compatibility flags */ | ||
62 | #define MAP_ANON MAP_ANONYMOUS | ||
63 | #define MAP_FILE 0 | ||
64 | 37 | ||
65 | #endif /* __SPARC_MMAN_H__ */ | 38 | #endif /* __SPARC_MMAN_H__ */ |
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index d705ec92da8b..6fd878e61435 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h | |||
@@ -2,21 +2,10 @@ | |||
2 | #ifndef __SPARC64_MMAN_H__ | 2 | #ifndef __SPARC64_MMAN_H__ |
3 | #define __SPARC64_MMAN_H__ | 3 | #define __SPARC64_MMAN_H__ |
4 | 4 | ||
5 | /* SunOS'ified... */ | 5 | #include <asm-generic/mman.h> |
6 | 6 | ||
7 | #define PROT_READ 0x1 /* page can be read */ | 7 | /* SunOS'ified... */ |
8 | #define PROT_WRITE 0x2 /* page can be written */ | ||
9 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
10 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
11 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
12 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
13 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
14 | 8 | ||
15 | #define MAP_SHARED 0x01 /* Share changes */ | ||
16 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
17 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
18 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
19 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
20 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 9 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
21 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 10 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
22 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | 11 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ |
@@ -27,10 +16,6 @@ | |||
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
28 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
29 | 18 | ||
30 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
31 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
32 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
33 | |||
34 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 19 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
35 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 20 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
36 | 21 | ||
@@ -48,18 +33,6 @@ | |||
48 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ | 33 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ |
49 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ | 34 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ |
50 | 35 | ||
51 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
52 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
53 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
54 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
55 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
56 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
57 | #define MADV_REMOVE 0x6 /* remove these pages & resources */ | ||
58 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
59 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
60 | |||
61 | /* compatibility flags */ | ||
62 | #define MAP_ANON MAP_ANONYMOUS | ||
63 | #define MAP_FILE 0 | ||
64 | 37 | ||
65 | #endif /* __SPARC64_MMAN_H__ */ | 38 | #endif /* __SPARC64_MMAN_H__ */ |
diff --git a/include/asm-v850/mman.h b/include/asm-v850/mman.h index 7b851c310e41..edbf6edbfb37 100644 --- a/include/asm-v850/mman.h +++ b/include/asm-v850/mman.h | |||
@@ -1,18 +1,7 @@ | |||
1 | #ifndef __V850_MMAN_H__ | 1 | #ifndef __V850_MMAN_H__ |
2 | #define __V850_MMAN_H__ | 2 | #define __V850_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
8 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
9 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
10 | |||
11 | #define MAP_SHARED 0x01 /* Share changes */ | ||
12 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
13 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
14 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
15 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
16 | 5 | ||
17 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
18 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -20,24 +9,7 @@ | |||
20 | #define MAP_LOCKED 0x2000 /* pages are locked */ | 9 | #define MAP_LOCKED 0x2000 /* pages are locked */ |
21 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
22 | 11 | ||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
25 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
26 | |||
27 | #define MCL_CURRENT 1 /* lock all current mappings */ | 12 | #define MCL_CURRENT 1 /* lock all current mappings */ |
28 | #define MCL_FUTURE 2 /* lock all future mappings */ | 13 | #define MCL_FUTURE 2 /* lock all future mappings */ |
29 | 14 | ||
30 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
31 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
32 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
33 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
34 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
35 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
36 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
37 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
38 | |||
39 | /* compatibility flags */ | ||
40 | #define MAP_ANON MAP_ANONYMOUS | ||
41 | #define MAP_FILE 0 | ||
42 | |||
43 | #endif /* __V850_MMAN_H__ */ | 15 | #endif /* __V850_MMAN_H__ */ |
diff --git a/include/asm-x86_64/mman.h b/include/asm-x86_64/mman.h index b699a38c1c3c..dd5cb0534d37 100644 --- a/include/asm-x86_64/mman.h +++ b/include/asm-x86_64/mman.h | |||
@@ -1,19 +1,8 @@ | |||
1 | #ifndef __X8664_MMAN_H__ | 1 | #ifndef __X8664_MMAN_H__ |
2 | #define __X8664_MMAN_H__ | 2 | #define __X8664_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
8 | #define PROT_SEM 0x8 | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | 5 | ||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ | 6 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ |
18 | 7 | ||
19 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
@@ -24,24 +13,7 @@ | |||
24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
26 | 15 | ||
27 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
28 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
29 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
30 | |||
31 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
32 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
33 | 18 | ||
34 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
35 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
36 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
37 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
38 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
39 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
40 | #define MADV_DONTFORK 0x30 /* dont inherit across fork */ | ||
41 | #define MADV_DOFORK 0x31 /* do inherit across fork */ | ||
42 | |||
43 | /* compatibility flags */ | ||
44 | #define MAP_ANON MAP_ANONYMOUS | ||
45 | #define MAP_FILE 0 | ||
46 | |||
47 | #endif | 19 | #endif |
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 */ |