Thread (7 messages) flat view 7 messages, 3 authors, 2012-02-09

Re: [PATCH] Implement GET_IP/SET_IP for powerpc architecture.

From: Srikar Dronamraju <hidden>
Date: 2012-02-02 16:55:14

* Mike Frysinger [off-list ref] [2012-02-02 11:28:46]:
On Thursday 02 February 2012 09:41:25 Srikar Dronamraju wrote:
quoted
+#define GET_FP(regs)		(0)
+#define SET_FP(regs, val)
ppc doesn't have a standard FP location ?
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
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help