aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/signal_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/signal_32.c')
-rw-r--r--arch/powerpc/kernel/signal_32.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index dd1dca5bfa81..e5cc803476a1 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -51,6 +51,8 @@
51#include <asm/pgtable.h> 51#include <asm/pgtable.h>
52#endif 52#endif
53 53
54#include "signal.h"
55
54#undef DEBUG_SIG 56#undef DEBUG_SIG
55 57
56#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 58#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -1156,30 +1158,8 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
1156#ifdef CONFIG_PPC32 1158#ifdef CONFIG_PPC32
1157no_signal: 1159no_signal:
1158#endif 1160#endif
1159 if (TRAP(regs) == 0x0C00 /* System Call! */ 1161 /* Is there any syscall restart business here ? */
1160 && regs->ccr & 0x10000000 /* error signalled */ 1162 check_syscall_restart(regs, &ka, signr > 0);
1161 && ((ret = regs->gpr[3]) == ERESTARTSYS
1162 || ret == ERESTARTNOHAND || ret == ERESTARTNOINTR
1163 || ret == ERESTART_RESTARTBLOCK)) {
1164
1165 if (signr > 0
1166 && (ret == ERESTARTNOHAND || ret == ERESTART_RESTARTBLOCK
1167 || (ret == ERESTARTSYS
1168 && !(ka.sa.sa_flags & SA_RESTART)))) {
1169 /* make the system call return an EINTR error */
1170 regs->result = -EINTR;
1171 regs->gpr[3] = EINTR;
1172 /* note that the cr0.SO bit is already set */
1173 } else {
1174 regs->nip -= 4; /* Back up & retry system call */
1175 regs->result = 0;
1176 regs->trap = 0;
1177 if (ret == ERESTART_RESTARTBLOCK)
1178 regs->gpr[0] = __NR_restart_syscall;
1179 else
1180 regs->gpr[3] = regs->orig_gpr3;
1181 }
1182 }
1183 1163
1184 if (signr == 0) { 1164 if (signr == 0) {
1185 /* No signal to deliver -- put the saved sigmask back */ 1165 /* No signal to deliver -- put the saved sigmask back */