[PATCH] Implement GET_IP/SET_IP for powerpc architecture.

Srikar Dronamraju srikar at linux.vnet.ibm.com
Fri Feb 3 03:36:59 EST 2012


* Mike Frysinger <vapier at gentoo.org> [2012-02-02 11:28:46]:

> On Thursday 02 February 2012 09:41:25 Srikar Dronamraju wrote:
> > +#define GET_FP(regs)		(0)
> > +#define SET_FP(regs, val)
> 
> ppc doesn't have a standard FP location ?
> 
> > +#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



More information about the Linuxppc-dev mailing list