aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-18 15:00:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-18 15:00:01 -0500
commit3653b9a8db41299a8735008026dad82035f8ca9b (patch)
tree334e9c7fa8684c7b4dea1153b304358b8853ff21 /arch
parent52af894cc35be34c6430d5411cd9033bd4dbbc51 (diff)
parent878a5535957b563c447d32866a9e606c55fef091 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: We need to implement arch_ptrace_stop().
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/ptrace_32.h10
-rw-r--r--arch/sparc/include/asm/ptrace_64.h9
2 files changed, 19 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])
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h
index 84e969f06afe..cd6fbfc20435 100644
--- a/arch/sparc/include/asm/ptrace_64.h
+++ b/arch/sparc/include/asm/ptrace_64.h
@@ -114,6 +114,7 @@ struct sparc_trapf {
114#ifdef __KERNEL__ 114#ifdef __KERNEL__
115 115
116#include <linux/threads.h> 116#include <linux/threads.h>
117#include <asm/system.h>
117 118
118static inline int pt_regs_trap_type(struct pt_regs *regs) 119static inline int pt_regs_trap_type(struct pt_regs *regs)
119{ 120{
@@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
130 return (regs->tstate &= ~TSTATE_SYSCALL); 131 return (regs->tstate &= ~TSTATE_SYSCALL);
131} 132}
132 133
134#define arch_ptrace_stop_needed(exit_code, info) \
135({ flush_user_windows(); \
136 get_thread_wsaved() != 0; \
137})
138
139#define arch_ptrace_stop(exit_code, info) \
140 synchronize_user_stack()
141
133struct global_reg_snapshot { 142struct global_reg_snapshot {
134 unsigned long tstate; 143 unsigned long tstate;
135 unsigned long tpc; 144 unsigned long tpc;