git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
include
/
asm-sh
/
ptrace.h
diff --git
a/include/asm-sh/ptrace.h
b/include/asm-sh/ptrace.h
index
d0ca02c
..
0f75e16
100644
(file)
--- a/
include/asm-sh/ptrace.h
+++ b/
include/asm-sh/ptrace.h
@@
-90,6
+90,15
@@
struct pt_dspregs {
#define user_mode(regs) (((regs)->sr & 0x40000000)==0)
#define instruction_pointer(regs) ((regs)->pc)
extern void show_regs(struct pt_regs *);
#define user_mode(regs) (((regs)->sr & 0x40000000)==0)
#define instruction_pointer(regs) ((regs)->pc)
extern void show_regs(struct pt_regs *);
+
+static inline unsigned long profile_pc(struct pt_regs *regs)
+{
+ unsigned long pc = instruction_pointer(regs);
+
+ if (pc >= 0xa0000000UL && pc < 0xc0000000UL)
+ pc -= 0x20000000;
+ return pc;
+}
#endif
#endif /* __ASM_SH_PTRACE_H */
#endif
#endif /* __ASM_SH_PTRACE_H */