diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-12-17 19:01:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:18 -0500 |
commit | 0ad50c3896afbb3c103409a18260e601b87a744c (patch) | |
tree | 3a59c1e90b3ee62daf18bc9689cf454a31f164be /arch/tile/kernel/compat.c | |
parent | 918854a65e856574523d94763ef2a2b48ad55a25 (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/tile/kernel/compat.c')
-rw-r--r-- | arch/tile/kernel/compat.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/tile/kernel/compat.c b/arch/tile/kernel/compat.c index 9cd7cb6041c0..7f72401b4f45 100644 --- a/arch/tile/kernel/compat.c +++ b/arch/tile/kernel/compat.c | |||
@@ -76,24 +76,6 @@ long compat_sys_fallocate(int fd, int mode, | |||
76 | ((loff_t)len_hi << 32) | len_lo); | 76 | ((loff_t)len_hi << 32) | len_lo); |
77 | } | 77 | } |
78 | 78 | ||
79 | |||
80 | |||
81 | long compat_sys_sched_rr_get_interval(compat_pid_t pid, | ||
82 | struct compat_timespec __user *interval) | ||
83 | { | ||
84 | struct timespec t; | ||
85 | int ret; | ||
86 | mm_segment_t old_fs = get_fs(); | ||
87 | |||
88 | set_fs(KERNEL_DS); | ||
89 | ret = sys_sched_rr_get_interval(pid, | ||
90 | (struct timespec __force __user *)&t); | ||
91 | set_fs(old_fs); | ||
92 | if (put_compat_timespec(&t, interval)) | ||
93 | return -EFAULT; | ||
94 | return ret; | ||
95 | } | ||
96 | |||
97 | /* Provide the compat syscall number to call mapping. */ | 79 | /* Provide the compat syscall number to call mapping. */ |
98 | #undef __SYSCALL | 80 | #undef __SYSCALL |
99 | #define __SYSCALL(nr, call) [nr] = (call), | 81 | #define __SYSCALL(nr, call) [nr] = (call), |