Commit f90080a0 authored by Franck Bui-Huu's avatar Franck Bui-Huu Committed by Ralf Baechle

[MIPS] signal: do not use save_static_function() anymore

This macro was used to save static registers before calling
sys_sigsuspend() and sys_sigreturn().

For the sys_sigreturn() case, there's no point to save them
since they have been already saved by setup_sigcontext()
before calling the signal handler.

For the sys_sigsuspend() case, I don't see any reasons...
Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 6bfe9661
...@@ -201,9 +201,7 @@ int install_sigtramp(unsigned int __user *tramp, unsigned int syscall) ...@@ -201,9 +201,7 @@ int install_sigtramp(unsigned int __user *tramp, unsigned int syscall)
*/ */
#ifdef CONFIG_TRAD_SIGNALS #ifdef CONFIG_TRAD_SIGNALS
save_static_function(sys_sigsuspend); asmlinkage int sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static int
_sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
{ {
sigset_t newset; sigset_t newset;
sigset_t __user *uset; sigset_t __user *uset;
...@@ -226,9 +224,7 @@ _sys_sigsuspend(nabi_no_regargs struct pt_regs regs) ...@@ -226,9 +224,7 @@ _sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
} }
#endif #endif
save_static_function(sys_rt_sigsuspend); asmlinkage int sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static int
_sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
{ {
sigset_t newset; sigset_t newset;
sigset_t __user *unewset; sigset_t __user *unewset;
...@@ -307,9 +303,7 @@ asmlinkage int sys_sigaltstack(nabi_no_regargs struct pt_regs regs) ...@@ -307,9 +303,7 @@ asmlinkage int sys_sigaltstack(nabi_no_regargs struct pt_regs regs)
} }
#ifdef CONFIG_TRAD_SIGNALS #ifdef CONFIG_TRAD_SIGNALS
save_static_function(sys_sigreturn); asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static void
_sys_sigreturn(nabi_no_regargs struct pt_regs regs)
{ {
struct sigframe __user *frame; struct sigframe __user *frame;
sigset_t blocked; sigset_t blocked;
...@@ -344,9 +338,7 @@ _sys_sigreturn(nabi_no_regargs struct pt_regs regs) ...@@ -344,9 +338,7 @@ _sys_sigreturn(nabi_no_regargs struct pt_regs regs)
} }
#endif /* CONFIG_TRAD_SIGNALS */ #endif /* CONFIG_TRAD_SIGNALS */
save_static_function(sys_rt_sigreturn); asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static void
_sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
{ {
struct rt_sigframe __user *frame; struct rt_sigframe __user *frame;
sigset_t set; sigset_t set;
......
...@@ -308,9 +308,7 @@ static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t __user *ubuf) ...@@ -308,9 +308,7 @@ static inline int get_sigset(sigset_t *kbuf, const compat_sigset_t __user *ubuf)
* Atomically swap in the new signal mask, and wait for a signal. * Atomically swap in the new signal mask, and wait for a signal.
*/ */
save_static_function(sys32_sigsuspend); asmlinkage int sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static int
_sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
{ {
compat_sigset_t __user *uset; compat_sigset_t __user *uset;
sigset_t newset; sigset_t newset;
...@@ -332,9 +330,7 @@ _sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) ...@@ -332,9 +330,7 @@ _sys32_sigsuspend(nabi_no_regargs struct pt_regs regs)
return -ERESTARTNOHAND; return -ERESTARTNOHAND;
} }
save_static_function(sys32_rt_sigsuspend); asmlinkage int sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static int
_sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
{ {
compat_sigset_t __user *uset; compat_sigset_t __user *uset;
sigset_t newset; sigset_t newset;
...@@ -495,9 +491,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) ...@@ -495,9 +491,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
return err; return err;
} }
save_static_function(sys32_sigreturn); asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static void
_sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
{ {
struct sigframe __user *frame; struct sigframe __user *frame;
sigset_t blocked; sigset_t blocked;
...@@ -531,9 +525,7 @@ _sys32_sigreturn(nabi_no_regargs struct pt_regs regs) ...@@ -531,9 +525,7 @@ _sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
force_sig(SIGSEGV, current); force_sig(SIGSEGV, current);
} }
save_static_function(sys32_rt_sigreturn); asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static void
_sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
{ {
struct rt_sigframe32 __user *frame; struct rt_sigframe32 __user *frame;
mm_segment_t old_fs; mm_segment_t old_fs;
......
...@@ -87,9 +87,7 @@ struct rt_sigframe_n32 { ...@@ -87,9 +87,7 @@ struct rt_sigframe_n32 {
extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat); extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat);
save_static_function(sysn32_rt_sigsuspend); asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static int
_sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
{ {
compat_sigset_t __user *unewset; compat_sigset_t __user *unewset;
compat_sigset_t uset; compat_sigset_t uset;
...@@ -119,9 +117,7 @@ _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) ...@@ -119,9 +117,7 @@ _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
return -ERESTARTNOHAND; return -ERESTARTNOHAND;
} }
save_static_function(sysn32_rt_sigreturn); asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
__attribute_used__ noinline static void
_sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
{ {
struct rt_sigframe_n32 __user *frame; struct rt_sigframe_n32 __user *frame;
sigset_t set; sigset_t set;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment