[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100924052230.GM19804@ZenIV.linux.org.uk>
Date: Fri, 24 Sep 2010 06:22:30 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Hirokazu Takata <takata@...ux-m32r.org>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: [PATCH 2/5] make m32r handle multiple pending signals
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
arch/m32r/kernel/entry.S | 4 ++--
arch/m32r/kernel/signal.c | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index 90149da..225412b 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -235,9 +235,9 @@ work_resched:
work_notifysig: ; deal with pending signals and
; notify-resume requests
mv r0, sp ; arg1 : struct pt_regs *regs
- ldi r1, r9 ; arg2 : __u32 thread_info_flags
+ mv r1, r9 ; arg2 : __u32 thread_info_flags
bl do_notify_resume
- bra restore_all
+ bra resume_userspace
; perform syscall exit tracing
ALIGN
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index acd69f7..db15226 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -282,6 +282,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
regs->bpc -= 2;
else
regs->bpc -= 4;
+ regs->syscall_nr = -1;
}
}
@@ -353,8 +354,8 @@ static int do_signal(struct pt_regs *regs)
regs->bpc -= 2;
else
regs->bpc -= 4;
- }
- if (regs->r0 == -ERESTART_RESTARTBLOCK){
+ regs->syscall_nr = -1;
+ } else if (regs->r0 == -ERESTART_RESTARTBLOCK){
regs->r0 = regs->orig_r0;
regs->r7 = __NR_restart_syscall;
inst = *(unsigned short *)(regs->bpc - 2);
@@ -362,6 +363,7 @@ static int do_signal(struct pt_regs *regs)
regs->bpc -= 2;
else
regs->bpc -= 4;
+ regs->syscall_nr = -1;
}
}
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists