aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-12-17 19:01:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 20:15:18 -0500
commit0ad50c3896afbb3c103409a18260e601b87a744c (patch)
tree3a59c1e90b3ee62daf18bc9689cf454a31f164be /arch/arm64
parent918854a65e856574523d94763ef2a2b48ad55a25 (diff)
compat: generic compat_sys_sched_rr_get_interval() implementation
This function is used by sparc, powerpc tile and arm64 for compat support. The patch adds a generic implementation with a wrapper for PowerPC to do the u32->int sign extension. The reason for a single patch covering powerpc, tile, sparc and arm64 is to keep it bisectable, otherwise kernel building may fail with mismatched function declarations. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com> [for tile] Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/unistd.h1
-rw-r--r--arch/arm64/kernel/sys_compat.c15
2 files changed, 1 insertions, 15 deletions
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
index d69aeea6da1e..76fb7dd3350a 100644
--- a/arch/arm64/include/asm/unistd.h
+++ b/arch/arm64/include/asm/unistd.h
@@ -20,6 +20,7 @@
20#define __ARCH_WANT_SYS_GETPGRP 20#define __ARCH_WANT_SYS_GETPGRP
21#define __ARCH_WANT_SYS_LLSEEK 21#define __ARCH_WANT_SYS_LLSEEK
22#define __ARCH_WANT_SYS_NICE 22#define __ARCH_WANT_SYS_NICE
23#define __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL
23#define __ARCH_WANT_SYS_SIGPENDING 24#define __ARCH_WANT_SYS_SIGPENDING
24#define __ARCH_WANT_SYS_SIGPROCMASK 25#define __ARCH_WANT_SYS_SIGPROCMASK
25#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 26#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c
index f7b05edf8ce3..26e9c4eeaba8 100644
--- a/arch/arm64/kernel/sys_compat.c
+++ b/arch/arm64/kernel/sys_compat.c
@@ -28,21 +28,6 @@
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/unistd32.h> 29#include <asm/unistd32.h>
30 30
31asmlinkage int compat_sys_sched_rr_get_interval(compat_pid_t pid,
32 struct compat_timespec __user *interval)
33{
34 struct timespec t;
35 int ret;
36 mm_segment_t old_fs = get_fs();
37
38 set_fs(KERNEL_DS);
39 ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t);
40 set_fs(old_fs);
41 if (put_compat_timespec(&t, interval))
42 return -EFAULT;
43 return ret;
44}
45
46static inline void 31static inline void
47do_compat_cache_op(unsigned long start, unsigned long end, int flags) 32do_compat_cache_op(unsigned long start, unsigned long end, int flags)
48{ 33{