25 #include <asm/uaccess.h>
28 #include <linux/linkage.h>
30 #include <linux/mman.h>
31 #include <linux/shm.h>
33 #include <linux/utsname.h>
34 #include <linux/personality.h>
36 static unsigned long get_unshared_area(
unsigned long addr,
unsigned long len)
46 if (!vma || addr + len <= vma->
vm_start)
52 #define DCACHE_ALIGN(addr) (((addr) + (SHMLBA - 1)) &~ (SHMLBA - 1))
67 return offset & 0x3FF000;
71 unsigned long addr,
unsigned long len,
unsigned long pgoff)
74 int offset = mapping ? get_offset(mapping) : 0;
76 offset = (offset + (pgoff <<
PAGE_SHIFT)) & 0x3FF000;
84 if (!vma || addr + len <= vma->
vm_start)
93 unsigned long len,
unsigned long pgoff,
unsigned long flags)
106 addr = get_shared_area(filp->
f_mapping, addr, len, pgoff);
108 addr = get_shared_area(
NULL, addr, len, pgoff);
110 addr = get_unshared_area(addr, len);
116 unsigned long prot,
unsigned long flags,
unsigned long fd,
126 unsigned long prot,
unsigned long flags,
unsigned long fd,
127 unsigned long offset)
141 unsigned int high,
unsigned int low)
147 unsigned int high,
unsigned int low)
162 asmlinkage long sys_fcntl64(
unsigned int fd,
unsigned int cmd,
unsigned long arg)
169 unsigned int high,
unsigned int low)
175 unsigned int high,
unsigned int low)
182 unsigned int high,
unsigned int low)
184 return sys_pread64(fd, buf, count, (loff_t)high << 32 | low);
188 size_t count,
unsigned int high,
unsigned int low)
190 return sys_pwrite64(fd, buf, count, (loff_t)high << 32 | low);
200 unsigned int high_off,
unsigned int low_off,
201 unsigned int high_len,
unsigned int low_len,
int advice)
204 (loff_t)high_len << 32 | low_len, advice);
212 (loff_t)hi_nbytes << 32 | lo_nbytes, flags);
230 && personality(personality) ==
PER_LINUX)