aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/compat_signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/kernel/compat_signal.c')
-rw-r--r--arch/tile/kernel/compat_signal.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c
index 77763ccd5a7d..cdef6e5ec022 100644
--- a/arch/tile/kernel/compat_signal.c
+++ b/arch/tile/kernel/compat_signal.c
@@ -403,19 +403,17 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
403 * Set up registers for signal handler. 403 * Set up registers for signal handler.
404 * Registers that we don't modify keep the value they had from 404 * Registers that we don't modify keep the value they had from
405 * user-space at the time we took the signal. 405 * user-space at the time we took the signal.
406 * We always pass siginfo and mcontext, regardless of SA_SIGINFO,
407 * since some things rely on this (e.g. glibc's debug/segfault.c).
406 */ 408 */
407 regs->pc = ptr_to_compat_reg(ka->sa.sa_handler); 409 regs->pc = ptr_to_compat_reg(ka->sa.sa_handler);
408 regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ 410 regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */
409 regs->sp = ptr_to_compat_reg(frame); 411 regs->sp = ptr_to_compat_reg(frame);
410 regs->lr = restorer; 412 regs->lr = restorer;
411 regs->regs[0] = (unsigned long) usig; 413 regs->regs[0] = (unsigned long) usig;
412 414 regs->regs[1] = ptr_to_compat_reg(&frame->info);
413 if (ka->sa.sa_flags & SA_SIGINFO) { 415 regs->regs[2] = ptr_to_compat_reg(&frame->uc);
414 /* Need extra arguments, so mark to restore caller-saves. */ 416 regs->flags |= PT_FLAGS_CALLER_SAVES;
415 regs->regs[1] = ptr_to_compat_reg(&frame->info);
416 regs->regs[2] = ptr_to_compat_reg(&frame->uc);
417 regs->flags |= PT_FLAGS_CALLER_SAVES;
418 }
419 417
420 /* 418 /*
421 * Notify any tracer that was single-stepping it. 419 * Notify any tracer that was single-stepping it.