Commit 265b6629 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: add mmap64 support

parent 39fec8cd
...@@ -696,7 +696,7 @@ _GLOBAL(sys_call_table32) ...@@ -696,7 +696,7 @@ _GLOBAL(sys_call_table32)
.llong .sys_vfork .llong .sys_vfork
.llong .sys32_getrlimit /* 190 */ .llong .sys32_getrlimit /* 190 */
.llong .sys32_readahead .llong .sys32_readahead
.llong .sys_ni_syscall /* 192 - reserved - mmap2 */ .llong .ppc32_mmap2
.llong .sys32_truncate64 /* 193 - truncate64 */ .llong .sys32_truncate64 /* 193 - truncate64 */
.llong .sys32_ftruncate64 /* 194 - ftruncate64 */ .llong .sys32_ftruncate64 /* 194 - ftruncate64 */
.llong .sys_stat64 /* 195 - stat64 */ .llong .sys_stat64 /* 195 - stat64 */
......
...@@ -44,10 +44,10 @@ _GLOBAL(sys32_getsockopt) ...@@ -44,10 +44,10 @@ _GLOBAL(sys32_getsockopt)
clrldi r7, r7, 32 /* int *optlen parm */ clrldi r7, r7, 32 /* int *optlen parm */
b .sys_getsockopt b .sys_getsockopt
_GLOBAL(sys32_mmap2) _GLOBAL(ppc32_mmap2)
clrldi r7, r7, 32 /* unsigned long fd parm */ clrldi r7, r7, 32 /* unsigned long fd parm */
extsw r8, r8 /* off_t offset */ clrldi r8, r8, 32 /* unsigned long pgoff */
b .sys_mmap b .sys32_mmap2
_GLOBAL(sys32_socketcall) /* r3=call, r4=args */ _GLOBAL(sys32_socketcall) /* r3=call, r4=args */
cmpwi r3, 1 cmpwi r3, 1
......
...@@ -4249,3 +4249,10 @@ asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len, ...@@ -4249,3 +4249,10 @@ asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len,
return ret; return ret;
} }
unsigned long sys32_mmap2(unsigned long addr, size_t len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
{
/* This should remain 12 even if PAGE_SIZE changes */
return sys_mmap(addr, len, prot, flags, fd, pgoff << 12);
}
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