summaryrefslogtreecommitdiffstats
path: root/arch/csky/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/csky/kernel/signal.c')
-rw-r--r--arch/csky/kernel/signal.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/csky/kernel/signal.c b/arch/csky/kernel/signal.c
index 207a891479d2..5a18940f0b09 100644
--- a/arch/csky/kernel/signal.c
+++ b/arch/csky/kernel/signal.c
@@ -224,7 +224,7 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs)
* that the kernel can handle, and then we build all the user-level signal
* handling stack-frames in one go after that.
*/
-static void do_signal(struct pt_regs *regs, int syscall)
+static void do_signal(struct pt_regs *regs)
{
unsigned int retval = 0, continue_addr = 0, restart_addr = 0;
struct ksignal ksig;
@@ -241,7 +241,9 @@ static void do_signal(struct pt_regs *regs, int syscall)
/*
* If we were from a system call, check for system call restarting...
*/
- if (syscall) {
+ if (in_syscall(regs)) {
+ forget_syscall(regs);
+
continue_addr = regs->pc;
#if defined(__CSKYABIV2__)
restart_addr = continue_addr - 4;
@@ -249,7 +251,6 @@ static void do_signal(struct pt_regs *regs, int syscall)
restart_addr = continue_addr - 2;
#endif
retval = regs->a0;
-
/*
* Prepare for system call restart. We do this here so that a
* debugger will see the already changed.
@@ -304,7 +305,9 @@ static void do_signal(struct pt_regs *regs, int syscall)
}
no_signal:
- if (syscall) {
+ if (in_syscall(regs)) {
+ forget_syscall(regs);
+
/*
* Handle restarting a different system call. As above,
* if a debugger has chosen to restart at a different PC,
@@ -333,10 +336,10 @@ no_signal:
}
asmlinkage void
-do_notify_resume(unsigned int thread_flags, struct pt_regs *regs, int syscall)
+do_notify_resume(unsigned int thread_flags, struct pt_regs *regs)
{
if (thread_flags & _TIF_SIGPENDING)
- do_signal(regs, syscall);
+ do_signal(regs);
if (thread_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);