]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc/include/asm/ptrace_64.h
sparc: We need to implement arch_ptrace_stop().
[linux-2.6-omap-h63xx.git] / arch / sparc / include / asm / ptrace_64.h
index 06e4914c13f4100182ccd5aa5720d3247e4469fa..cd6fbfc2043533636dd16fec2918cf0a07124be1 100644 (file)
@@ -113,6 +113,9 @@ struct sparc_trapf {
 
 #ifdef __KERNEL__
 
+#include <linux/threads.h>
+#include <asm/system.h>
+
 static inline int pt_regs_trap_type(struct pt_regs *regs)
 {
        return regs->magic & 0x1ff;
@@ -128,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->tstate &= ~TSTATE_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       get_thread_wsaved() != 0; \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 struct global_reg_snapshot {
        unsigned long           tstate;
        unsigned long           tpc;
@@ -138,8 +149,7 @@ struct global_reg_snapshot {
        struct thread_info      *thread;
        unsigned long           pad1;
 };
-
-#define __ARCH_WANT_COMPAT_SYS_PTRACE
+extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
 
 #define force_successful_syscall_return()          \
 do {   current_thread_info()->syscall_noerror = 1; \