sparc: Create and use TIF_NOTIFY_RESUME.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -69,12 +69,13 @@ ret_trap_lockless_ipi:
|
||||
|
||||
ld [%curptr + TI_FLAGS], %g2
|
||||
signal_p:
|
||||
andcc %g2, (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %g0
|
||||
andcc %g2, _TIF_DO_NOTIFY_RESUME_MASK, %g0
|
||||
bz,a ret_trap_continue
|
||||
ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr
|
||||
|
||||
mov %g2, %o2
|
||||
mov %l5, %o1
|
||||
call do_signal
|
||||
call do_notify_resume
|
||||
add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr
|
||||
|
||||
/* Fall through. */
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/smp.h>
|
||||
#include <linux/binfmts.h> /* do_coredum */
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/tracehook.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/ptrace.h>
|
||||
@@ -513,7 +514,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
|
||||
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
||||
* mistake.
|
||||
*/
|
||||
asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0)
|
||||
static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
|
||||
{
|
||||
struct k_sigaction ka;
|
||||
int restart_syscall;
|
||||
@@ -579,6 +580,17 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0)
|
||||
}
|
||||
}
|
||||
|
||||
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
|
||||
unsigned long thread_info_flags)
|
||||
{
|
||||
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
|
||||
do_signal(regs, orig_i0);
|
||||
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
|
||||
clear_thread_flag(TIF_NOTIFY_RESUME);
|
||||
tracehook_notify_resume(regs);
|
||||
}
|
||||
}
|
||||
|
||||
asmlinkage int
|
||||
do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr,
|
||||
unsigned long sp)
|
||||
|
||||
Reference in New Issue
Block a user