aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/include
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-10-23 13:30:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-23 16:23:58 -0400
commit6b14e4198c729b748a7f6d22059e6a101d2b241a (patch)
tree77668782763f74aec995899e919231e81a71d56a /arch/tile/include
parent530550651fdfd548d25b6bd5ff4607803540508b (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.h9
-rw-r--r--arch/tile/include/asm/syscalls.h19
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);
281long compat_sys_rt_sigqueueinfo(int pid, int sig, 281long compat_sys_rt_sigqueueinfo(int pid, int sig,
282 struct compat_siginfo __user *uinfo); 282 struct compat_siginfo __user *uinfo);
283long compat_sys_rt_sigreturn(struct pt_regs *); 283long compat_sys_rt_sigreturn(void);
284long compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr, 284long 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 *);
287long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high); 286long compat_sys_truncate64(char __user *filename, u32 dummy, u32 low, u32 high);
288long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high); 287long compat_sys_ftruncate64(unsigned int fd, u32 dummy, u32 low, u32 high);
289long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, 288long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count,
@@ -300,9 +299,7 @@ long compat_sys_fallocate(int fd, int mode,
300long compat_sys_sched_rr_get_interval(compat_pid_t pid, 299long 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. */
304long _compat_sys_sigaltstack(const struct compat_sigaltstack __user *uss_ptr,
305 struct compat_sigaltstack __user *uoss_ptr);
306long _compat_sys_rt_sigreturn(void); 303long _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 */
54long sys_cmpxchg_badaddr(unsigned long address, struct pt_regs *); 54long sys_cmpxchg_badaddr(unsigned long address);
55long _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);
63long sys_ftruncate64(unsigned int fd, loff_t length); 62long 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(). */
67long _sys_sigaltstack(const stack_t __user *, stack_t __user *); 66long sys_clone(unsigned long clone_flags, unsigned long newsp,
68long _sys_rt_sigreturn(void);
69long _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);
71long sys_execve(const char __user *filename, 68long 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);
71long sys_rt_sigreturn(void);
72long 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. */
79long _sys_rt_sigreturn(void);
80long _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