forked from luck/tmp_suning_uos_patched
90f72aa58b
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>
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
#ifndef _ASM_IA64_MMAN_H
|
|
#define _ASM_IA64_MMAN_H
|
|
|
|
/*
|
|
* Based on <asm-i386/mman.h>.
|
|
*
|
|
* Modified 1998-2000, 2002
|
|
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
|
|
*/
|
|
|
|
#include <asm-generic/mman-common.h>
|
|
|
|
#define MAP_GROWSDOWN 0x00100 /* stack-like segment */
|
|
#define MAP_GROWSUP 0x00200 /* register stack-like segment */
|
|
#define MAP_DENYWRITE 0x00800 /* ETXTBSY */
|
|
#define MAP_EXECUTABLE 0x01000 /* mark it as an executable */
|
|
#define MAP_LOCKED 0x02000 /* pages are locked */
|
|
#define MAP_NORESERVE 0x04000 /* don't check for reservations */
|
|
#define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */
|
|
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
|
|
#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
|
|
#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
|
|
|
|
#define MCL_CURRENT 1 /* lock all current mappings */
|
|
#define MCL_FUTURE 2 /* lock all future mappings */
|
|
|
|
#ifdef __KERNEL__
|
|
#ifndef __ASSEMBLY__
|
|
#define arch_mmap_check ia64_mmap_check
|
|
int ia64_mmap_check(unsigned long addr, unsigned long len,
|
|
unsigned long flags);
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* _ASM_IA64_MMAN_H */
|