X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fasm-sparc%2Fmman.h;h=3d16b40bb8effebf23c6cc74bd8a8140c2063daa;hb=551f4cb9de716ffcdaf968c99a450c22ff12e8c3;hp=4a298b2be8591d253a293824ac67afa78b2f848b;hpb=f822566165dd46ff5de9bf895cfa6c51f53bb0c4;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 4a298b2..3d16b40 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h @@ -2,21 +2,10 @@ #ifndef __SPARC_MMAN_H__ #define __SPARC_MMAN_H__ -/* SunOS'ified... */ +#include -#define PROT_READ 0x1 /* page can be read */ -#define PROT_WRITE 0x2 /* page can be written */ -#define PROT_EXEC 0x4 /* page can be executed */ -#define PROT_SEM 0x8 /* page may be used for atomic ops */ -#define PROT_NONE 0x0 /* page can not be accessed */ -#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ -#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ +/* SunOS'ified... */ -#define MAP_SHARED 0x01 /* Share changes */ -#define MAP_PRIVATE 0x02 /* Changes are private */ -#define MAP_TYPE 0x0f /* Mask for type of mapping */ -#define MAP_FIXED 0x10 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x20 /* don't use a file */ #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... */ @@ -27,39 +16,17 @@ #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_INVALIDATE 2 /* invalidate the caches */ -#define MS_SYNC 4 /* synchronous memory sync */ - #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 */ -/* XXX Need to add flags to SunOS's mctl, mlockall, and madvise system - * XXX calls. - */ - -/* SunOS sys_mctl() stuff... */ -#define MC_SYNC 1 /* Sync pages in memory with storage (usu. a file) */ -#define MC_LOCK 2 /* Lock pages into core ram, do not allow swapping of them */ -#define MC_UNLOCK 3 /* Unlock pages locked via previous mctl() with MC_LOCK arg */ -#define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ -#define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ - -#define MADV_NORMAL 0x0 /* default page-in behavior */ -#define MADV_RANDOM 0x1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ -#define MADV_WILLNEED 0x3 /* pre-fault pages */ -#define MADV_DONTNEED 0x4 /* discard these pages */ -#define MADV_FREE 0x5 /* (Solaris) contents can be freed */ -#define MADV_REMOVE 0x6 /* remove these pages & resources */ -#define MADV_DONTFORK 0x30 /* dont inherit across fork */ -#define MADV_DOFORK 0x31 /* do inherit across fork */ - -/* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS -#define MAP_FILE 0 +#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__ */