Subject: Re: [2/2] powerpc/modules: Never restore r2 for a mprofile-kernel style mcount() call

From: Michael Ellerman <[email-masked]>
Date: Fri, 22 Jul 2016 15:50:43 +1000 (AEST)

On Tue, 2016-19-07 at 04:48:31 UTC, Michael Ellerman wrote:
> In the module loader we process relocations, and for long jumps we
> generate trampolines (aka stubs). At the call site for one of these
> trampolines we usually need to generate a load instruction to restore
> the TOC pointer into r2.
...
> 
> The fix is relatively simple, in restore_r2() we check for an
> mprofile-kernel style mcount() call first, before looking for the
> presence of a nop.
> 
> Fixes: 153086644fd1 ("powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI")
> Signed-off-by: Michael Ellerman <[email-masked]>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/31278b17a0dfed3014786b623f

cheers