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>
33 lines
1.3 KiB
C
33 lines
1.3 KiB
C
#ifndef __SPARC_MMAN_H__
|
|
#define __SPARC_MMAN_H__
|
|
|
|
#include <asm-generic/mman-common.h>
|
|
|
|
/* SunOS'ified... */
|
|
|
|
#define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */
|
|
#define MAP_NORESERVE 0x40 /* don't reserve swap pages */
|
|
#define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */
|
|
#define MAP_LOCKED 0x100 /* lock the mapping */
|
|
#define _MAP_NEW 0x80000000 /* Binary compatibility is fun... */
|
|
|
|
#define MAP_GROWSDOWN 0x0200 /* stack-like segment */
|
|
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
|
|
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
|
|
|
|
#define MCL_CURRENT 0x2000 /* lock all currently mapped pages */
|
|
#define MCL_FUTURE 0x4000 /* lock all additions to address space */
|
|
|
|
#define MAP_POPULATE 0x8000 /* 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 */
|
|
|
|
#ifdef __KERNEL__
|
|
#ifndef __ASSEMBLY__
|
|
#define arch_mmap_check(addr,len,flags) sparc_mmap_check(addr,len)
|
|
int sparc_mmap_check(unsigned long addr, unsigned long len);
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* __SPARC_MMAN_H__ */
|