summaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-03-05 13:38:04 +0100
committerRichard Weinberger <richard@sigma-star.at>2014-08-06 13:03:46 +0200
commite90670a9629a68c1bf5bbb59d0077684f22a5cb9 (patch)
tree08956c456ad3783661225b6853eee6db58b38aca /arch/blackfin
parent065f31bd263b61b1fbf6c0ae4e7c0d3cf7373b10 (diff)
downloadlinux-e90670a9629a68c1bf5bbb59d0077684f22a5cb9.tar.bz2
blackfin: Use sigsp()
Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Steven Miao <realmz6@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/signal.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 1389cd3b74e3..ef275571d885 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -135,19 +135,11 @@ static inline int rt_setup_sigcontext(struct sigcontext *sc, struct pt_regs *reg
return err;
}
-static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
+static inline void *get_sigframe(struct ksignal *ksig,
size_t frame_size)
{
- unsigned long usp;
+ unsigned long usp = sigsp(rdusp(), ksig);
- /* Default to using normal stack. */
- usp = rdusp();
-
- /* This is the X/Open sanctioned signal stack switching. */
- if (ka->sa.sa_flags & SA_ONSTACK) {
- if (!on_sig_stack(usp))
- usp = current->sas_ss_sp + current->sas_ss_size;
- }
return (void *)((usp - frame_size) & -8UL);
}
@@ -157,7 +149,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
struct rt_sigframe *frame;
int err = 0;
- frame = get_sigframe(&ksig->ka, regs, sizeof(*frame));
+ frame = get_sigframe(ksig, sizeof(*frame));
err |= __put_user((current_thread_info()->exec_domain
&& current_thread_info()->exec_domain->signal_invmap