Commit 63cafcea authored by Anton Blanchard's avatar Anton Blanchard

ppc64: add sendfile64 support and restore ioperm syscall

parent 265b6629
......@@ -605,7 +605,7 @@ _GLOBAL(sys_call_table32)
.llong .sys_ni_syscall /* old profil syscall holder */
.llong .sys32_statfs
.llong .sys32_fstatfs /* 100 */
.llong .sys_ni_syscall /* old ioperm syscall holder */
.llong .sys_ioperm
.llong .sys32_socketcall
.llong .sys32_syslog
.llong .sys32_setitimer
......@@ -730,8 +730,9 @@ _GLOBAL(sys_call_table32)
.llong .sys32_sched_getaffinity
.llong .sys_ni_syscall /* reserved for security */
.llong .sys_ni_syscall /* 225 - reserved for tux */
.llong .sys32_sendfile64
.rept NR_syscalls-225
.rept NR_syscalls-226
.llong .sys_ni_syscall
.endr
#endif
......@@ -839,7 +840,7 @@ _GLOBAL(sys_call_table)
.llong .sys_ni_syscall /* old profil syscall holder */
.llong .sys_statfs
.llong .sys_fstatfs /* 100 */
.llong .sys_ni_syscall /* old ioperm syscall holder */
.llong .sys_ioperm
.llong .sys_socketcall
.llong .sys_syslog
.llong .sys_setitimer
......@@ -964,7 +965,8 @@ _GLOBAL(sys_call_table)
.llong .sys_sched_getaffinity
.llong .sys_ni_syscall /* reserved for security */
.llong .sys_ni_syscall /* reserved for tux */
.llong .sys_ni_syscall /* reserved for sendfile64 */
.rept NR_syscalls-225
.llong .sys_ni_syscall
.rept NR_syscalls-226
.llong .sys_ni_syscall
.endr
......@@ -2785,6 +2785,27 @@ asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, __kernel_off_t32* offset,
return ret;
}
extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count);
asmlinkage int sys32_sendfile64(int out_fd, int in_fd, __kernel_loff_t32 *offset, s32 count)
{
mm_segment_t old_fs = get_fs();
int ret;
loff_t lof;
if (offset && get_user(lof, offset))
return -EFAULT;
set_fs(KERNEL_DS);
ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count);
set_fs(old_fs);
if (offset && put_user(lof, offset))
return -EFAULT;
return ret;
}
extern asmlinkage int sys_setsockopt(int fd, int level, int optname, char *optval, int optlen);
asmlinkage long sys32_setsockopt(int fd, int level, int optname, char* optval, int optlen)
......@@ -4249,6 +4270,11 @@ asmlinkage int sys32_sched_getaffinity(__kernel_pid_t32 pid, unsigned int len,
return ret;
}
extern unsigned long sys_mmap(unsigned long addr, size_t len,
unsigned long prot, unsigned long flags,
unsigned long fd, off_t offset);
unsigned long sys32_mmap2(unsigned long addr, size_t len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff)
......
......@@ -235,6 +235,7 @@
#define __NR_sched_getaffinity 223
#define __NR_security 224
#define __NR_tuxcall 225
#define __NR_sendfile64 226
#define __NR(n) #n
......
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