MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / mman.h
blob516ab26a68c8dc288ae2f53c9cc1df98f2ff2bf5
1 /*
2 * Copied from the m68k port.
4 * Copyright (C) 2004, Microtronix Datacom Ltd.
6 * All rights reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef __NIOS2_MMAN_H__
26 #define __NIOS2_MMAN_H__
28 #define PROT_READ 0x1 /* page can be read */
29 #define PROT_WRITE 0x2 /* page can be written */
30 #define PROT_EXEC 0x4 /* page can be executed */
31 #define PROT_SEM 0x8 /* page may be used for atomic ops */
32 #define PROT_NONE 0x0 /* page can not be accessed */
33 #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
34 #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
36 #define MAP_SHARED 0x01 /* Share changes */
37 #define MAP_PRIVATE 0x02 /* Changes are private */
38 #define MAP_TYPE 0x0f /* Mask for type of mapping */
39 #define MAP_FIXED 0x10 /* Interpret addr exactly */
40 #define MAP_ANONYMOUS 0x20 /* don't use a file */
42 #define MAP_GROWSDOWN 0x0100 /* stack-like segment */
43 #define MAP_DENYWRITE 0x0800 /* ETXTBSY */
44 #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
45 #define MAP_LOCKED 0x2000 /* pages are locked */
46 #define MAP_NORESERVE 0x4000 /* don't check for reservations */
47 #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
48 #define MAP_NONBLOCK 0x10000 /* do not block on IO */
50 #define MS_ASYNC 1 /* sync memory asynchronously */
51 #define MS_INVALIDATE 2 /* invalidate the caches */
52 #define MS_SYNC 4 /* synchronous memory sync */
54 #define MCL_CURRENT 1 /* lock all current mappings */
55 #define MCL_FUTURE 2 /* lock all future mappings */
57 #define MADV_NORMAL 0x0 /* default page-in behavior */
58 #define MADV_RANDOM 0x1 /* page-in minimum required */
59 #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
60 #define MADV_WILLNEED 0x3 /* pre-fault pages */
61 #define MADV_DONTNEED 0x4 /* discard these pages */
63 /* compatibility flags */
64 #define MAP_ANON MAP_ANONYMOUS
65 #define MAP_FILE 0
67 #endif /* __NIOS2_MMAN_H__ */