Subject: Re: [PATCH 4/6] Add ppc_function_entry() which gets the entry point for a function

From: Michael Ellerman <[email-masked]>
Date: Thu, 29 May 2008 16:57:46 +1000

On Thu, 2008-05-29 at 16:37 +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2008-05-29 at 16:20 +1000, Michael Ellerman wrote:
> > Because function pointers point to different things on 32-bit vs
> > 64-bit,
> > add a macro that deals with dereferencing the OPD on 64-bit. The soon
> > to
> > be merged ftrace wants this, as well as other code I am working on.
> > 
> > Signed-off-by: Michael Ellerman <[email-masked]>
> 
> Should we be smarter and also compare if the TOC pointer is the same
> between the source and target and if not, warn loudly ?

> Or we just don't care ?

I think currently only the module loader worries about changing TOC
pointers, but perhaps we should think about it in other places too. What
do you do on 32-bit though?

Still, I think that would be a new separate macro, so this stands on its
own IMHO.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person