mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
sparc: Merge asm-sparc{,64}/mman.h
Renaming the function sparc64_mmap_check() to sparc_mmap_check() was enough to make the two header files identical. :$ diff -u include/asm-sparc/mman.h include/asm-sparc64/mman.h :-- include/asm-sparc/mman.h 2008-06-13 06:46:39.000000000 +0200 :++ include/asm-sparc64/mman.h 2008-06-13 06:46:39.000000000 +0200 :@@ -1,5 +1,5 @@ :-#ifndef __SPARC_MMAN_H__ :-#define __SPARC_MMAN_H__ :+#ifndef __SPARC64_MMAN_H__ :+#define __SPARC64_MMAN_H__ : : #include <asm-generic/mman.h> : :@@ -23,9 +23,9 @@ : : #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); :+#define arch_mmap_check(addr,len,flags) sparc64_mmap_check(addr,len) :+int sparc64_mmap_check(unsigned long addr, unsigned long len); : #endif : #endif : :-#endif /* __SPARC_MMAN_H__ */ :+#endif /* __SPARC64_MMAN_H__ */ Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
2d1419624c
commit
f92ffa12f4
3 changed files with 6 additions and 36 deletions
|
@ -542,7 +542,7 @@ asmlinkage long sparc64_personality(unsigned long personality)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int sparc64_mmap_check(unsigned long addr, unsigned long len)
|
||||
int sparc_mmap_check(unsigned long addr, unsigned long len)
|
||||
{
|
||||
if (test_thread_flag(TIF_32BIT)) {
|
||||
if (len >= STACK_TOP32)
|
||||
|
@ -614,9 +614,9 @@ asmlinkage unsigned long sys64_mremap(unsigned long addr,
|
|||
goto out;
|
||||
if (unlikely(new_len >= VA_EXCLUDE_START))
|
||||
goto out;
|
||||
if (unlikely(sparc64_mmap_check(addr, old_len)))
|
||||
if (unlikely(sparc_mmap_check(addr, old_len)))
|
||||
goto out;
|
||||
if (unlikely(sparc64_mmap_check(new_addr, new_len)))
|
||||
if (unlikely(sparc_mmap_check(new_addr, new_len)))
|
||||
goto out;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
|
|
|
@ -871,9 +871,9 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr,
|
|||
unsigned long ret = -EINVAL;
|
||||
unsigned long new_addr = __new_addr;
|
||||
|
||||
if (unlikely(sparc64_mmap_check(addr, old_len)))
|
||||
if (unlikely(sparc_mmap_check(addr, old_len)))
|
||||
goto out;
|
||||
if (unlikely(sparc64_mmap_check(new_addr, new_len)))
|
||||
if (unlikely(sparc_mmap_check(new_addr, new_len)))
|
||||
goto out;
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
ret = do_mremap(addr, old_len, new_len, flags, new_addr);
|
||||
|
|
|
@ -1,31 +1 @@
|
|||
#ifndef __SPARC64_MMAN_H__
|
||||
#define __SPARC64_MMAN_H__
|
||||
|
||||
#include <asm-generic/mman.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 */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
#define arch_mmap_check(addr,len,flags) sparc64_mmap_check(addr,len)
|
||||
int sparc64_mmap_check(unsigned long addr, unsigned long len);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __SPARC64_MMAN_H__ */
|
||||
#include <asm-sparc/mman.h>
|
||||
|
|
Loading…
Reference in a new issue