[v3][PATCH 2/3] ppc/kprobe: complete kprobe and migrate exception frame

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Sep 12 18:43:02 EST 2012


On Wed, 2012-09-12 at 16:38 +0800, tiejun.chen wrote:
> > So you need to store that old r1 somewhere fist then retrieve it
> > after the memcpy call. That or open-code the memcpy to avoid all
> > the clobbering problems.
> 
> Maybe we can use copy_and_flush() since looks copy_and_flush() only
> clobber r0, 
> r6 and LR explicitly.
> 
> I'll resync these comments for v4. 

I'd say just open code it. You already have src and dst in registers,
the length can easily be put in ctr... easier that way, not clobbering
to worry about nor stack frame to create etc...

Cheers,
Ben.




More information about the Linuxppc-dev mailing list