With this change, helpers such as instruction_pointer() et al, get defined
in the generic header in terms of GET_IP
Signed-off-by: Srikar Dronamraju <redacted>
Signed-off-by: Ananth N Mavinakayanahalli <redacted>
---
arch/powerpc/include/asm/ptrace.h | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
pretty sure you don't need this as asm-generic/ptrace.h already has a
definition for you
On ppc64, profile_pc is an extern function if CONFIG_SMP is set.
else its same as whats defined in asm-generic/ptrace.h
Now if we allow asm-generic/ptrace.h definition to take effect, then
powerpc/time.h (where the actual profile_pc is defined as an extern
function) fails with an error for redefinition.
Hence our approach was to define profile_pc before asm-generic/ptrace.h
gets included. One change that we could do was to define profile_pc
only under CONFIG_SMP. But I think it makes the code less confusing.
Otherwise people might keep wondering why profile_pc is defined only for
CONFIG_SMP case.
--
Thanks and Regards
Srikar
Not really no, it's the sp (r1). r31 might be considered a "frame
pointer" under some circumstances but there isn't much you can do with
it, it's really r1 that gives you the ability to backtrace (each stack
frame contains a pointer to the next one).
quoted
+#define profile_pc(regs) GET_IP(regs)
pretty sure you don't need this as asm-generic/ptrace.h already has a
definition for you
-mike
With this change, helpers such as instruction_pointer() et al, get defined
in the generic header in terms of GET_IP
Removed the unnecessary definition of profile_pc in !CONFIG_SMP case as
suggested by Mike Frysinger.
Signed-off-by: Srikar Dronamraju <redacted>
Signed-off-by: Ananth N Mavinakayanahalli <redacted>
---
arch/powerpc/include/asm/ptrace.h | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)