diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-10-23 13:30:54 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-23 16:23:58 -0400 |
commit | 6b14e4198c729b748a7f6d22059e6a101d2b241a (patch) | |
tree | 77668782763f74aec995899e919231e81a71d56a /arch/tile/include | |
parent | 530550651fdfd548d25b6bd5ff4607803540508b (diff) |
arch/tile: eliminate pt_regs trampolines for syscalls
Using the new current_pt_regs() model, we can remove some trampolines
from assembly code and call directly to the C syscall implementations.
rt_sigreturn() and clone() still need some assembly wrapping, but no
longer are passed a pt_regs pointer. sigaltstack() and the
tilepro-specific cmpxchg_badaddr() syscalls are now just straight C.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include')
-rw-r--r-- | arch/tile/include/asm/compat.h | 9 | ||||
-rw-r--r-- | arch/tile/include/asm/syscalls.h | 19 |
2 files changed, 16 insertions, 12 deletions
diff --git a/arch/tile/include/asm/compat.h b/arch/tile/include/asm/compat.h index 3bcf1b94b563..ca61fb4296b3 100644 --- a/arch/tile/include/asm/compat.h +++ b/arch/tile/include/asm/compat.h | |||
@@ -280,10 +280,9 @@ long compat_sys_rt_sigaction(int sig, struct compat_sigaction __user *act, | |||
280 | size_t sigsetsize); | 280 | size_t sigsetsize); |
281 | long compat_sys_rt_sigqueueinfo(int pid, int sig, | 281 | long compat_sys_rt_sigqueueinfo(int pid, int sig, |
282 | struct compat_siginfo __user *uinfo); | 282 | struct compat_siginfo __user *uinfo); |
283 | long compat_sys_rt_sigreturn(struct pt_regs *); | 283 | long compat_sys_rt_sigreturn(void); |
284 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | 284 | long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, |
285 | struct compat_sigaltstack __user *uoss_ptr, | 285 | struct compat_sigaltstack __user *uoss_ptr); |
286 | struct pt_regs *); | ||
287 | long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high); | 286 | long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high); |
288 | long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high); | 287 | long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high); |
289 | long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, | 288 | long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, |
@@ -300,9 +299,7 @@ long compat_sys_fallocate(int fd, int mode, | |||
300 | long compat_sys_sched_rr_get_interval(compat_pid_t pid, | 299 | long compat_sys_sched_rr_get_interval(compat_pid_t pid, |
301 | struct compat_timespec __user *interval); | 300 | struct compat_timespec __user *interval); |
302 | 301 | ||
303 | /* These are the intvec_64.S trampolines. */ | 302 | /* Assembly trampoline to avoid clobbering r0. */ |
304 | long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, | ||
305 | struct compat_sigaltstack __user *uoss_ptr); | ||
306 | long _compat_sys_rt_sigreturn(void); | 303 | long _compat_sys_rt_sigreturn(void); |
307 | 304 | ||
308 | #endif /* _ASM_TILE_COMPAT_H */ | 305 | #endif /* _ASM_TILE_COMPAT_H */ |
diff --git a/arch/tile/include/asm/syscalls.h b/arch/tile/include/asm/syscalls.h index 0d52992f8e05..369696d63e7b 100644 --- a/arch/tile/include/asm/syscalls.h +++ b/arch/tile/include/asm/syscalls.h | |||
@@ -51,8 +51,7 @@ long sys_cacheflush(unsigned long addr, unsigned long len, | |||
51 | 51 | ||
52 | #ifndef __tilegx__ | 52 | #ifndef __tilegx__ |
53 | /* mm/fault.c */ | 53 | /* mm/fault.c */ |
54 | long sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *); | 54 | long sys_cmpxchg_badaddr(unsigned long address); |
55 | long _sys_cmpxchg_badaddr(unsigned long address); | ||
56 | #endif | 55 | #endif |
57 | 56 | ||
58 | #ifdef CONFIG_COMPAT | 57 | #ifdef CONFIG_COMPAT |
@@ -63,15 +62,23 @@ long sys_truncate64(const char __user *path, loff_t length); | |||
63 | long sys_ftruncate64(unsigned int fd, loff_t length); | 62 | long sys_ftruncate64(unsigned int fd, loff_t length); |
64 | #endif | 63 | #endif |
65 | 64 | ||
66 | /* These are the intvec*.S trampolines. */ | 65 | /* Provide versions of standard syscalls that use current_pt_regs(). */ |
67 | long _sys_sigaltstack(const stack_t __user *, stack_t __user *); | 66 | long sys_clone(unsigned long clone_flags, unsigned long newsp, |
68 | long _sys_rt_sigreturn(void); | ||
69 | long _sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
70 | void __user *parent_tid, void __user *child_tid); | 67 | void __user *parent_tid, void __user *child_tid); |
71 | long sys_execve(const char __user *filename, | 68 | long sys_execve(const char __user *filename, |
72 | const char __user *const __user *argv, | 69 | const char __user *const __user *argv, |
73 | const char __user *const __user *envp); | 70 | const char __user *const __user *envp); |
71 | long sys_rt_sigreturn(void); | ||
72 | long sys_sigaltstack(const stack_t __user *, stack_t __user *); | ||
73 | #define sys_clone sys_clone | ||
74 | #define sys_execve sys_execve | 74 | #define sys_execve sys_execve |
75 | #define sys_rt_sigreturn sys_rt_sigreturn | ||
76 | #define sys_sigaltstack sys_sigaltstack | ||
77 | |||
78 | /* These are the intvec*.S trampolines. */ | ||
79 | long _sys_rt_sigreturn(void); | ||
80 | long _sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
81 | void __user *parent_tid, void __user *child_tid); | ||
75 | 82 | ||
76 | #include <asm-generic/syscalls.h> | 83 | #include <asm-generic/syscalls.h> |
77 | 84 | ||