diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-01-29 01:33:54 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:51 -0500 |
commit | ddaebcabbc18811ac4ac6e84fb9c327e8393a1dc (patch) | |
tree | 1fef12d7d009245a006a94b17bb1bd0c0a4404ff | |
parent | 9e228ee9eae97b533d3b3133f76478c70dbd4294 (diff) | |
download | blackbird-op-linux-ddaebcabbc18811ac4ac6e84fb9c327e8393a1dc.tar.gz blackbird-op-linux-ddaebcabbc18811ac4ac6e84fb9c327e8393a1dc.zip |
Blackfin: add support for restart_syscall()
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | arch/blackfin/kernel/signal.c | 9 |
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 @@ #include <asm/cacheflush.h> #include <asm/ucontext.h> #include <asm/fixed_code.h> +#include <asm/syscall.h> #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) @@ -50,6 +51,9 @@ rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *p unsigned long usp = 0; int err = 0; + /* Always make any pending restarted system calls return -EINTR */ + current_thread_info()->restart_block.fn = do_no_restart_syscall; + #define RESTORE(x) err |= __get_user(regs->x, &sc->sc_##x) /* restore passed registers */ @@ -237,6 +241,11 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler) regs->r0 = regs->orig_r0; regs->pc -= 2; break; + + case -ERESTART_RESTARTBLOCK: + regs->p0 = __NR_restart_syscall; + regs->pc -= 2; + break; } } |