diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-09-21 20:03:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:41 -0400 |
commit | 90f72aa58bbf076b68e289fbd71eb829bc505923 (patch) | |
tree | 992e5f59086cc77581fa10b52fb4a46fb3baf3f0 /arch/alpha | |
parent | 6bfde05bf5c9682e255c6a2c669dc80f91af6296 (diff) |
mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions
Add a flag for mmap that will be used to request a huge page region that
will look like anonymous memory to user space. This is accomplished by
using a file on the internal vfsmount. MAP_HUGETLB is a modifier of
MAP_ANONYMOUS and so must be specified with it. The region will behave
the same as a MAP_ANONYMOUS region using small pages.
The patch also adds the MAP_STACK flag, which was previously defined only
on some architectures but not on others. Since MAP_STACK is meant to be a
hint only, architectures can define it without assigning a specific
meaning to it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: David Rientjes <rientjes@google.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/include/asm/mman.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/alpha/include/asm/mman.h b/arch/alpha/include/asm/mman.h index c77c55756a7c..99c56d47879d 100644 --- a/arch/alpha/include/asm/mman.h +++ b/arch/alpha/include/asm/mman.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #define MAP_NORESERVE 0x10000 /* don't check for reservations */ | 28 | #define MAP_NORESERVE 0x10000 /* don't check for reservations */ |
29 | #define MAP_POPULATE 0x20000 /* populate (prefault) pagetables */ | 29 | #define MAP_POPULATE 0x20000 /* populate (prefault) pagetables */ |
30 | #define MAP_NONBLOCK 0x40000 /* do not block on IO */ | 30 | #define MAP_NONBLOCK 0x40000 /* do not block on IO */ |
31 | #define MAP_STACK 0x80000 /* give out an address that is best suited for process/thread stacks */ | ||
32 | #define MAP_HUGETLB 0x100000 /* create a huge page mapping */ | ||
31 | 33 | ||
32 | #define MS_ASYNC 1 /* sync memory asynchronously */ | 34 | #define MS_ASYNC 1 /* sync memory asynchronously */ |
33 | #define MS_SYNC 2 /* synchronous memory sync */ | 35 | #define MS_SYNC 2 /* synchronous memory sync */ |