m68knommu: fix syscall restart handling
authorGreg Ungerer <gerg@snapgear.com>
Tue, 23 Oct 2007 04:37:54 +0000 (14:37 +1000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Oct 2007 15:32:07 +0000 (08:32 -0700)
Fix system call restart handling. We can call directly to the
restart handler, no need to back track through trap that isn't
even implemented on m68knommu.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/m68knommu/kernel/signal.c

index 437f8c6c14a0d872a45084b10caef28a541703c1..70371378db868de2ce8cabf544993e44d4ef8aa2 100644 (file)
@@ -781,15 +781,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
        /* Did we come from a system call? */
        if (regs->orig_d0 >= 0) {
                /* Restart the system call - no handlers present */
-               if (regs->d0 == -ERESTARTNOHAND
-                   || regs->d0 == -ERESTARTSYS
-                   || regs->d0 == -ERESTARTNOINTR) {
-                       regs->d0 = regs->orig_d0;
-                       regs->pc -= 2;
-               } else if (regs->d0 == -ERESTART_RESTARTBLOCK) {
-                       regs->d0 = __NR_restart_syscall;
-                       regs->pc -= 2;
-               }
+               handle_restart(regs, NULL, 0);
        }
        return 0;
 }