aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/signal.c')
-rw-r--r--arch/mips/kernel/signal.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index b2e9ab1bb101..adbfb95e42d0 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -398,7 +398,7 @@ badframe:
398} 398}
399 399
400#ifdef CONFIG_TRAD_SIGNALS 400#ifdef CONFIG_TRAD_SIGNALS
401int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, 401static int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
402 int signr, sigset_t *set) 402 int signr, sigset_t *set)
403{ 403{
404 struct sigframe __user *frame; 404 struct sigframe __user *frame;
@@ -443,7 +443,7 @@ give_sigsegv:
443} 443}
444#endif 444#endif
445 445
446int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, 446static int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
447 int signr, sigset_t *set, siginfo_t *info) 447 int signr, sigset_t *set, siginfo_t *info)
448{ 448{
449 struct rt_sigframe __user *frame; 449 struct rt_sigframe __user *frame;
@@ -501,6 +501,14 @@ give_sigsegv:
501 return -EFAULT; 501 return -EFAULT;
502} 502}
503 503
504struct mips_abi mips_abi = {
505#ifdef CONFIG_TRAD_SIGNALS
506 .setup_frame = setup_frame,
507#endif
508 .setup_rt_frame = setup_rt_frame,
509 .restart = __NR_restart_syscall
510};
511
504static int handle_signal(unsigned long sig, siginfo_t *info, 512static int handle_signal(unsigned long sig, siginfo_t *info,
505 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) 513 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
506{ 514{
@@ -539,7 +547,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
539 return ret; 547 return ret;
540} 548}
541 549
542void do_signal(struct pt_regs *regs) 550static void do_signal(struct pt_regs *regs)
543{ 551{
544 struct k_sigaction ka; 552 struct k_sigaction ka;
545 sigset_t *oldset; 553 sigset_t *oldset;
@@ -589,7 +597,7 @@ void do_signal(struct pt_regs *regs)
589 regs->cp0_epc -= 8; 597 regs->cp0_epc -= 8;
590 } 598 }
591 if (regs->regs[2] == ERESTART_RESTARTBLOCK) { 599 if (regs->regs[2] == ERESTART_RESTARTBLOCK) {
592 regs->regs[2] = __NR_restart_syscall; 600 regs->regs[2] = current->thread.abi->restart;
593 regs->regs[7] = regs->regs[26]; 601 regs->regs[7] = regs->regs[26];
594 regs->cp0_epc -= 4; 602 regs->cp0_epc -= 4;
595 } 603 }
@@ -615,5 +623,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
615{ 623{
616 /* deal with pending signal delivery */ 624 /* deal with pending signal delivery */
617 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) 625 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
618 current->thread.abi->do_signal(regs); 626 do_signal(regs);
619} 627}