summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-27 04:47:53 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-27 04:47:53 +0000
commit36ea5120664550fae6d31f1c6f695e4f8975cb06 (patch)
tree7b985f066e6fa149027022366b9f3dd92506db24 /arch/mips/kernel/signal.c
parentf7f4aaffdad04eb69ab618c771df0416ad04a952 (diff)
o Speedup syscalls. Now 816ns per syscall. Yes, nanoseconds and goodbye
Pentium :-) o Little bit smarter handling of unimplemented exceptions. o Fix FPU context switches. o Fix reboot / halt. Powerdown in software still doesn't work. o Fix the fix for handling of return values of interrupted syscalls. o Handling of the Indy second level cache now works as spec'ed. Purely cosmentic, this was not causing any problems.
Diffstat (limited to 'arch/mips/kernel/signal.c')
-rw-r--r--arch/mips/kernel/signal.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 0e7a24766..007e95452 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -4,7 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994, 1995, 1996 Ralf Baechle
*
- * $Id: signal.c,v 1.9 1998/03/17 22:07:36 ralf Exp $
+ * $Id: signal.c,v 1.17 1998/03/26 07:39:10 ralf Exp $
*/
#include <linux/config.h>
#include <linux/sched.h>
@@ -203,11 +203,6 @@ asmlinkage int sys_sigreturn(struct pt_regs regs)
restore_sigcontext(&regs, context);
/*
- * Disable syscall checks
- */
- regs.orig_reg2 = -1;
-
- /*
* Don't let your children do this ...
*/
__asm__ __volatile__(
@@ -347,30 +342,29 @@ static inline void handle_signal(unsigned long sig, struct k_sigaction *ka,
}
}
-static inline void syscall_restart(unsigned long or2, unsigned long or7,
- struct pt_regs *regs, struct sigaction *sa)
+static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
{
switch(regs->regs[0]) {
case ERESTARTNOHAND:
- no_system_call_restart:
- regs->regs[0] = regs->regs[2] = EINTR;
+ regs->regs[2] = EINTR;
break;
case ERESTARTSYS:
- if(!(sa->sa_flags & SA_RESTART))
- goto no_system_call_restart;
+ if(!(ka->sa.sa_flags & SA_RESTART)) {
+ regs->regs[2] = EINTR;
+ break;
+ }
/* fallthrough */
- case ERESTARTNOINTR:
- regs->regs[0] = regs->regs[2] = or2;
- regs->regs[7] = or7;
+ case ERESTARTNOINTR: /* Userland will reload $v0. */
regs->cp0_epc -= 8;
}
+
+ regs->regs[0] = 0; /* Don't deal with this again. */
}
extern int do_irix_signal(sigset_t *oldset, struct pt_regs *regs);
asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
{
- unsigned long r7 = regs->orig_reg7;
struct k_sigaction *ka;
siginfo_t info;
@@ -478,7 +472,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
}
if (regs->regs[0])
- syscall_restart(regs->orig_reg2, r7, regs, &ka->sa);
+ syscall_restart(regs, ka);
/* Whee! Actually deliver the signal. */
handle_signal(signr, ka, &info, oldset, regs);
return 1;
@@ -493,9 +487,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
if (regs->regs[2] == ERESTARTNOHAND ||
regs->regs[2] == ERESTARTSYS ||
regs->regs[2] == ERESTARTNOINTR) {
- regs->regs[0] = regs->regs[2] = regs->orig_reg2;
- regs->regs[7] = r7;
- regs->cp0_epc -= 8;
+ regs->cp0_epc -= 8;
}
}
return 0;