aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/signal.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-07-27 02:52:52 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-28 02:30:50 -0400
commit7d6d637dac2050f30a1b57b0a3dc5de4a10616ba (patch)
tree5108cacaf5e204d58bc07afb1d67c73144f1bf55 /arch/powerpc/kernel/signal.c
parentf1ba12856b7a7d43e495e216bc91e6bbf7aac383 (diff)
powerpc: Add TIF_NOTIFY_RESUME support for tracehook
This adds TIF_NOTIFY_RESUME support for powerpc. When set, we call tracehook_notify_resume() on the way to user mode. This overloads do_signal() to do the work, but changes its arguments to it has the TIF_* bits handy in a register and drops the useless first argument that was always zero. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/signal.c')
-rw-r--r--arch/powerpc/kernel/signal.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
index e74aa0ed4e9e..a54405ebd7b0 100644
--- a/arch/powerpc/kernel/signal.c
+++ b/arch/powerpc/kernel/signal.c
@@ -112,7 +112,7 @@ static void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka,
112 } 112 }
113} 113}
114 114
115int do_signal(sigset_t *oldset, struct pt_regs *regs) 115static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs)
116{ 116{
117 siginfo_t info; 117 siginfo_t info;
118 int signr; 118 int signr;
@@ -188,6 +188,17 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
188 return ret; 188 return ret;
189} 189}
190 190
191void do_signal(struct pt_regs *regs, unsigned long thread_info_flags)
192{
193 if (thread_info_flags & _TIF_SIGPENDING)
194 do_signal_pending(NULL, regs);
195
196 if (thread_info_flags & _TIF_NOTIFY_RESUME) {
197 clear_thread_flag(TIF_NOTIFY_RESUME);
198 tracehook_notify_resume(regs);
199 }
200}
201
191long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, 202long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
192 unsigned long r5, unsigned long r6, unsigned long r7, 203 unsigned long r5, unsigned long r6, unsigned long r7,
193 unsigned long r8, struct pt_regs *regs) 204 unsigned long r8, struct pt_regs *regs)