diff options
author | Roland McGrath <roland@redhat.com> | 2008-04-20 15:06:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-27 17:32:19 -0700 |
commit | e35a8925e0e7af8b26161a2c161ea31be0296b80 (patch) | |
tree | 708008d1494a91f76277f9140a219ac24e88e432 /arch/sparc64 | |
parent | badcbf0e8654c4a4ca51fe46c75a70376e83c1ef (diff) | |
download | kernel_samsung_aries-e35a8925e0e7af8b26161a2c161ea31be0296b80.zip kernel_samsung_aries-e35a8925e0e7af8b26161a2c161ea31be0296b80.tar.gz kernel_samsung_aries-e35a8925e0e7af8b26161a2c161ea31be0296b80.tar.bz2 |
sparc64: tracehook: TIF_NOTIFY_RESUME
This adds TIF_NOTIFY_RESUME support for sparc64.
When set, we call tracehook_notify_resume() on the way to user mode.
Signed-off-by: Roland McGrath <roland@redhat.com>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/rtrap.S | 6 | ||||
-rw-r--r-- | arch/sparc64/kernel/signal.c | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index c6fc695..97a993c 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S @@ -46,7 +46,7 @@ __handle_user_windows: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate ldx [%g6 + TI_FLAGS], %l0 -1: andcc %l0, _TIF_SIGPENDING, %g0 +1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 be,pt %xcc, __handle_user_windows_continue nop mov %l5, %o1 @@ -86,7 +86,7 @@ __handle_perfctrs: wrpr %g0, RTRAP_PSTATE, %pstate wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate ldx [%g6 + TI_FLAGS], %l0 -1: andcc %l0, _TIF_SIGPENDING, %g0 +1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 be,pt %xcc, __handle_perfctrs_continue sethi %hi(TSTATE_PEF), %o0 @@ -195,7 +195,7 @@ __handle_preemption_continue: andcc %l1, %o0, %g0 andcc %l0, _TIF_NEED_RESCHED, %g0 bne,pn %xcc, __handle_preemption - andcc %l0, _TIF_SIGPENDING, %g0 + andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 bne,pn %xcc, __handle_signal __handle_signal_continue: ldub [%g6 + TI_WSAVED], %o2 diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 9667e96..9424fda 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c @@ -17,6 +17,7 @@ #include <linux/errno.h> #include <linux/wait.h> #include <linux/ptrace.h> +#include <linux/tracehook.h> #include <linux/unistd.h> #include <linux/mm.h> #include <linux/tty.h> @@ -605,4 +606,8 @@ void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long { if (thread_info_flags & _TIF_SIGPENDING) do_signal(regs, orig_i0); + if (thread_info_flags & _TIF_NOTIFY_RESUME) { + clear_thread_flag(TIF_NOTIFY_RESUME); + tracehook_notify_resume(regs); + } } |