]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/powerpc/include/asm/ptrace.h
powerpc: don't use asm-generic/ptrace.h
[linux.git] / arch / powerpc / include / asm / ptrace.h
index faa5a338ac5a9c0d6919cdfe7a35331e4c8990de..feee1b21bbd5f1292f1bfa92ed89d4cbd10fdd64 100644 (file)
@@ -111,18 +111,33 @@ struct pt_regs
 
 #ifndef __ASSEMBLY__
 
-#define GET_IP(regs)           ((regs)->nip)
-#define GET_USP(regs)          ((regs)->gpr[1])
-#define GET_FP(regs)           (0)
-#define SET_FP(regs, val)
+static inline unsigned long instruction_pointer(struct pt_regs *regs)
+{
+       return regs->nip;
+}
+
+static inline void instruction_pointer_set(struct pt_regs *regs,
+               unsigned long val)
+{
+       regs->nip = val;
+}
+
+static inline unsigned long user_stack_pointer(struct pt_regs *regs)
+{
+       return regs->gpr[1];
+}
+
+static inline unsigned long frame_pointer(struct pt_regs *regs)
+{
+       return 0;
+}
 
 #ifdef CONFIG_SMP
 extern unsigned long profile_pc(struct pt_regs *regs);
-#define profile_pc profile_pc
+#else
+#define profile_pc(regs) instruction_pointer(regs)
 #endif
 
-#include <asm-generic/ptrace.h>
-
 #define kernel_stack_pointer(regs) ((regs)->gpr[1])
 static inline int is_syscall_success(struct pt_regs *regs)
 {