Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287640
b: refs/heads/master
c: e628942
h: refs/heads/master
v: v3
  • Loading branch information
Srikar Dronamraju authored and Benjamin Herrenschmidt committed Feb 14, 2012
1 parent 7030eb6 commit eebd49c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 454c0bfd0c6469276dec766e5b41efcf0ccf2619
refs/heads/master: e62894273c7572cb1bec39096df605f42a66e964
20 changes: 12 additions & 8 deletions trunk/arch/powerpc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,18 @@ struct pt_regs {

#ifndef __ASSEMBLY__

#define instruction_pointer(regs) ((regs)->nip)
#define user_stack_pointer(regs) ((regs)->gpr[1])
#define GET_IP(regs) ((regs)->nip)
#define GET_USP(regs) ((regs)->gpr[1])
#define GET_FP(regs) (0)
#define SET_FP(regs, val)

#ifdef CONFIG_SMP
extern unsigned long profile_pc(struct pt_regs *regs);
#define profile_pc profile_pc
#endif

#include <asm-generic/ptrace.h>

#define kernel_stack_pointer(regs) ((regs)->gpr[1])
static inline int is_syscall_success(struct pt_regs *regs)
{
Expand All @@ -99,12 +109,6 @@ static inline long regs_return_value(struct pt_regs *regs)
return -regs->gpr[3];
}

#ifdef CONFIG_SMP
extern unsigned long profile_pc(struct pt_regs *regs);
#else
#define profile_pc(regs) instruction_pointer(regs)
#endif

#ifdef __powerpc64__
#define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1)
#else
Expand Down

0 comments on commit eebd49c

Please sign in to comment.