Commit 8673f4ab authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Add posix timers, tgkill, utimes, statfs64.

parent c2245332
......@@ -838,6 +838,20 @@ _GLOBAL(sys_call_table32)
.llong .sys_epoll_ctl
.llong .sys_epoll_wait
.llong .sys_remap_file_pages
.llong .sys_ni_syscall /* 240 */
.llong .sys_ni_syscall
.llong .sys_ni_syscall
.llong .sys_ni_syscall
.llong .sys_ni_syscall
.llong .sys_ni_syscall /* 245 */
.llong .sys_ni_syscall
.llong .sys_ni_syscall
.llong .sys_ni_syscall
.llong .sys_ni_syscall
.llong .sys32_tgkill /* 250 */
.llong .sys32_utimes
.llong .sys_statfs64
.llong .sys_fstatfs64
.balign 8
_GLOBAL(sys_call_table)
......@@ -1081,3 +1095,17 @@ _GLOBAL(sys_call_table)
.llong .sys_epoll_ctl
.llong .sys_epoll_wait
.llong .sys_remap_file_pages
.llong .sys_timer_create /* 240 */
.llong .sys_timer_settime
.llong .sys_timer_gettime
.llong .sys_timer_getoverrun
.llong .sys_timer_delete
.llong .sys_clock_settime /* 245 */
.llong .sys_clock_gettime
.llong .sys_clock_getres
.llong .sys_clock_nanosleep
.llong .sys_ni_syscall
.llong .sys_tgkill /* 250 */
.llong .sys_utimes
.llong .sys_statfs64
.llong .sys_fstatfs64
......@@ -2797,6 +2797,47 @@ long sys32_io_submit(aio_context_t ctx_id, u32 number, u32 *iocbpp)
return i ? i : ret;
}
int get_compat_timeval(struct timeval *tv, struct compat_timeval *ctv)
{
return (verify_area(VERIFY_READ, ctv, sizeof(*ctv)) ||
__get_user(tv->tv_sec, &ctv->tv_sec) ||
__get_user(tv->tv_usec, &ctv->tv_usec)) ? -EFAULT : 0;
}
long sys32_utimes(char *filename, struct compat_timeval *tvs)
{
char *kfilename;
struct timeval ktvs[2];
mm_segment_t old_fs;
long ret;
kfilename = getname(filename);
ret = PTR_ERR(kfilename);
if (!IS_ERR(kfilename)) {
if (tvs) {
if (get_compat_timeval(&ktvs[0], &tvs[0]) ||
get_compat_timeval(&ktvs[1], &tvs[1]))
return -EFAULT;
}
old_fs = get_fs();
set_fs(KERNEL_DS);
ret = do_utimes(kfilename, (tvs ? &ktvs[0] : NULL));
set_fs(old_fs);
putname(kfilename);
}
return ret;
}
extern long sys_tgkill(int tgid, int pid, int sig);
long sys32_tgkill(u32 tgid, u32 pid, int sig)
{
/* sign extend tgid, pid */
return sys_tgkill((int)tgid, (int)pid, sig);
}
/*
* long long munging:
* The 32 bit ABI passes long longs in an odd even register pair.
......
......@@ -259,8 +259,13 @@
#define __NR_clock_gettime 246
#define __NR_clock_getres 247
#define __NR_clock_nanosleep 248
#define __NR_swapcontext 249
#define __NR_tgkill 250
#define __NR_utimes 251
#define __NR_statfs64 252
#define __NR_fstatfs64 253
#define __NR_syscalls 239
#define __NR_syscalls 254
#ifdef __KERNEL__
#define NR_syscalls __NR_syscalls
#endif
......
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