aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-28 20:33:54 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:51 -0500
commitddaebcabbc18811ac4ac6e84fb9c327e8393a1dc (patch)
tree1fef12d7d009245a006a94b17bb1bd0c0a4404ff /arch
parent9e228ee9eae97b533d3b3133f76478c70dbd4294 (diff)
Blackfin: add support for restart_syscall()
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/signal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 28d6f28c058c..d536f35d1f43 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -17,6 +17,7 @@
17#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
18#include <asm/ucontext.h> 18#include <asm/ucontext.h>
19#include <asm/fixed_code.h> 19#include <asm/fixed_code.h>
20#include <asm/syscall.h>
20 21
21#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 22#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
22 23
@@ -50,6 +51,9 @@ rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *p
50 unsigned long usp = 0; 51 unsigned long usp = 0;
51 int err = 0; 52 int err = 0;
52 53
54 /* Always make any pending restarted system calls return -EINTR */
55 current_thread_info()->restart_block.fn = do_no_restart_syscall;
56
53#define RESTORE(x) err |= __get_user(regs->x, &sc->sc_##x) 57#define RESTORE(x) err |= __get_user(regs->x, &sc->sc_##x)
54 58
55 /* restore passed registers */ 59 /* restore passed registers */
@@ -237,6 +241,11 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
237 regs->r0 = regs->orig_r0; 241 regs->r0 = regs->orig_r0;
238 regs->pc -= 2; 242 regs->pc -= 2;
239 break; 243 break;
244
245 case -ERESTART_RESTARTBLOCK:
246 regs->p0 = __NR_restart_syscall;
247 regs->pc -= 2;
248 break;
240 } 249 }
241} 250}
242 251