22 #include <linux/errno.h>
23 #include <linux/sched.h>
28 #include <linux/sem.h>
29 #include <linux/msg.h>
30 #include <linux/shm.h>
31 #include <linux/stat.h>
32 #include <linux/mman.h>
34 #include <linux/ipc.h>
35 #include <linux/utsname.h>
38 #include <linux/personality.h>
40 #include <asm/uaccess.h>
41 #include <asm/syscalls.h>
43 #include <asm/unistd.h>
45 static inline unsigned long do_mmap2(
unsigned long addr,
size_t len,
46 unsigned long prot,
unsigned long flags,
47 unsigned long fd,
unsigned long off,
int shift)
55 if (off & ((1 << shift) - 1))
65 unsigned long sys_mmap2(
unsigned long addr,
size_t len,
66 unsigned long prot,
unsigned long flags,
67 unsigned long fd,
unsigned long pgoff)
69 return do_mmap2(addr, len, prot, flags, fd, pgoff,
PAGE_SHIFT-12);
72 unsigned long sys_mmap(
unsigned long addr,
size_t len,
73 unsigned long prot,
unsigned long flags,
76 return do_mmap2(addr, len, prot, flags, fd, offset,
PAGE_SHIFT);
89 if ( (
unsigned long)n >= 4096 )
110 && personality(personality) ==
PER_LINUX)
120 u32 len_high,
u32 len_low)
123 (
u64)len_high << 32 | len_low, advice);
127 unsigned long r6,
unsigned long r7,
unsigned long r8,
130 printk(
"syscall %ld(%lx, %lx, %lx, %lx, %lx, %lx) regs=%p current=%p"
131 " cpu=%d\n", regs->
gpr[0], r3, r4, r5, r6, r7, r8, regs,