Commit f92ffa12 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller

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: default avatarSam Ravnborg <sam@ravnborg.org>
parent 2d141962
......@@ -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(&current->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(&current->mm->mmap_sem);
ret = do_mremap(addr, old_len, new_len, flags, new_addr);
......
#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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment