aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/ptrace_32.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/ptrace_32.h')
-rw-r--r--arch/sparc/include/asm/ptrace_32.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h
index d409c4f21a5c..4cef450167dd 100644
--- a/arch/sparc/include/asm/ptrace_32.h
+++ b/arch/sparc/include/asm/ptrace_32.h
@@ -62,6 +62,8 @@ struct sparc_stackf {
62 62
63#ifdef __KERNEL__ 63#ifdef __KERNEL__
64 64
65#include <asm/system.h>
66
65static inline bool pt_regs_is_syscall(struct pt_regs *regs) 67static inline bool pt_regs_is_syscall(struct pt_regs *regs)
66{ 68{
67 return (regs->psr & PSR_SYSCALL); 69 return (regs->psr & PSR_SYSCALL);
@@ -72,6 +74,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
72 return (regs->psr &= ~PSR_SYSCALL); 74 return (regs->psr &= ~PSR_SYSCALL);
73} 75}
74 76
77#define arch_ptrace_stop_needed(exit_code, info) \
78({ flush_user_windows(); \
79 current_thread_info()->w_saved != 0; \
80})
81
82#define arch_ptrace_stop(exit_code, info) \
83 synchronize_user_stack()
84
75#define user_mode(regs) (!((regs)->psr & PSR_PS)) 85#define user_mode(regs) (!((regs)->psr & PSR_PS))
76#define instruction_pointer(regs) ((regs)->pc) 86#define instruction_pointer(regs) ((regs)->pc)
77#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) 87#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])