diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-09-13 09:55:17 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-09-14 14:53:07 +0100 |
commit | 338a7bd9176617ae96bea8e73189484d41f7f1c0 (patch) | |
tree | efdabf1beab278118863020238de4c8196be870b | |
parent | d85a06d5ef792f53b674dd7dfda92726dba5f761 (diff) | |
download | linux-aarch64-338a7bd9176617ae96bea8e73189484d41f7f1c0.tar.gz |
Add generic compat_sys_sched_rr_get_interval implementation
This patch adds a generic implementation for
compat_sys_sched_rr_get_interval as it is used by other architectures.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | include/linux/compat.h | 3 | ||||
-rw-r--r-- | kernel/compat.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 5f2d2ccf8db..7b1783d9665 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -593,6 +593,9 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid, asmlinkage int compat_sys_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, s32 count); +asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid, + struct compat_timespec __user *interval); + #else #define is_compat_task() (0) diff --git a/kernel/compat.c b/kernel/compat.c index c28a306ae05..b4afeadf101 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -1215,6 +1215,23 @@ compat_sys_sysinfo(struct compat_sysinfo __user *info) return 0; } +#ifdef __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL +asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid, + struct compat_timespec __user *interval) +{ + struct timespec t; + int ret; + mm_segment_t old_fs = get_fs(); + + set_fs(KERNEL_DS); + ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t); + set_fs(old_fs); + if (put_compat_timespec(&t, interval)) + return -EFAULT; + return ret; +} +#endif /* __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL */ + /* * Allocate user-space memory for the duration of a single system call, * in order to marshall parameters inside a compat thunk. |