aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/ptrace.h')
-rw-r--r--arch/sparc/include/asm/ptrace.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h
index da43bdc62294..bdfafd7af46f 100644
--- a/arch/sparc/include/asm/ptrace.h
+++ b/arch/sparc/include/asm/ptrace.h
@@ -32,6 +32,9 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
32#define arch_ptrace_stop(exit_code, info) \ 32#define arch_ptrace_stop(exit_code, info) \
33 synchronize_user_stack() 33 synchronize_user_stack()
34 34
35#define current_pt_regs() \
36 ((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
37
35struct global_reg_snapshot { 38struct global_reg_snapshot {
36 unsigned long tstate; 39 unsigned long tstate;
37 unsigned long tpc; 40 unsigned long tpc;
@@ -55,9 +58,7 @@ union global_cpu_snapshot {
55 58
56extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS]; 59extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS];
57 60
58#define force_successful_syscall_return() \ 61#define force_successful_syscall_return() set_thread_noerror(1)
59do { current_thread_info()->syscall_noerror = 1; \
60} while (0)
61#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) 62#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
62#define instruction_pointer(regs) ((regs)->tpc) 63#define instruction_pointer(regs) ((regs)->tpc)
63#define instruction_pointer_set(regs, val) ((regs)->tpc = (val)) 64#define instruction_pointer_set(regs, val) ((regs)->tpc = (val))
@@ -100,6 +101,9 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
100#define arch_ptrace_stop(exit_code, info) \ 101#define arch_ptrace_stop(exit_code, info) \
101 synchronize_user_stack() 102 synchronize_user_stack()
102 103
104#define current_pt_regs() \
105 ((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
106
103#define user_mode(regs) (!((regs)->psr & PSR_PS)) 107#define user_mode(regs) (!((regs)->psr & PSR_PS))
104#define instruction_pointer(regs) ((regs)->pc) 108#define instruction_pointer(regs) ((regs)->pc)
105#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) 109#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])