diff options
author | Richard Weinberger <richard@nod.at> | 2014-03-02 17:46:11 +0400 |
---|---|---|
committer | Richard Weinberger <richard@sigma-star.at> | 2014-08-06 15:03:09 +0400 |
commit | 129b69df9c9074750245fca8aa92df5cc1a86ef4 (patch) | |
tree | 10c9f8b350d6946a1a38dfade27f42930e1af358 /arch/powerpc/kernel/signal.c | |
parent | e4dc894b61776733629b24507031dd46f5ba5efc (diff) | |
download | linux-129b69df9c9074750245fca8aa92df5cc1a86ef4.tar.xz |
powerpc: Use get_signal() signal_setup_done()
Use the more generic functions get_signal() signal_setup_done()
for signal delivery.
This inverts also the return codes of setup_*frame() to follow the
kernel convention.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/powerpc/kernel/signal.c')
-rw-r--r-- | arch/powerpc/kernel/signal.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c index 1c794cef2883..aa9b048c4766 100644 --- a/arch/powerpc/kernel/signal.c +++ b/arch/powerpc/kernel/signal.c @@ -105,25 +105,23 @@ static void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka, } } -static int do_signal(struct pt_regs *regs) +static void do_signal(struct pt_regs *regs) { sigset_t *oldset = sigmask_to_save(); - siginfo_t info; - int signr; - struct k_sigaction ka; + struct ksignal ksig; int ret; int is32 = is_32bit_task(); - signr = get_signal_to_deliver(&info, &ka, regs, NULL); + get_signal(&ksig); /* Is there any syscall restart business here ? */ - check_syscall_restart(regs, &ka, signr > 0); + check_syscall_restart(regs, &ksig.ka, ksig.sig > 0); - if (signr <= 0) { + if (ksig.sig <= 0) { /* No signal to deliver -- put the saved sigmask back */ restore_saved_sigmask(); regs->trap = 0; - return 0; /* no signals delivered */ + return; /* no signals delivered */ } #ifndef CONFIG_PPC_ADV_DEBUG_REGS @@ -140,23 +138,16 @@ static int do_signal(struct pt_regs *regs) thread_change_pc(current, regs); if (is32) { - if (ka.sa.sa_flags & SA_SIGINFO) - ret = handle_rt_signal32(signr, &ka, &info, oldset, - regs); + if (ksig.ka.sa.sa_flags & SA_SIGINFO) + ret = handle_rt_signal32(&ksig, oldset, regs); else - ret = handle_signal32(signr, &ka, &info, oldset, - regs); + ret = handle_signal32(&ksig, oldset, regs); } else { - ret = handle_rt_signal64(signr, &ka, &info, oldset, regs); + ret = handle_rt_signal64(&ksig, oldset, regs); } regs->trap = 0; - if (ret) { - signal_delivered(signr, &info, &ka, regs, - test_thread_flag(TIF_SINGLESTEP)); - } - - return ret; + signal_setup_done(ret, &ksig, test_thread_flag(TIF_SINGLESTEP)); } void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) |