Re: [PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller()

2016-02-26 Thread Michael Ellerman
On Thu, 2016-02-25 at 14:31 +0100, Torsten Duwe wrote: > On Thu, Feb 25, 2016 at 11:08:54AM +1100, Balbir Singh wrote: > > How about some comments on r2 > > r2 is still pointing to the module's toc, will be saved by ftrace_caller > > and restored by the instruction following bl ftrace_caller

Re: [PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller()

2016-02-25 Thread Torsten Duwe
On Thu, Feb 25, 2016 at 11:08:54AM +1100, Balbir Singh wrote: > How about some comments on r2 > r2 is still pointing to the module's toc, will be saved by ftrace_caller and > restored by the instruction following bl ftrace_caller (after patching > _mcount/nop) To be precise: ftrace_caller needs

Re: [PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller()

2016-02-25 Thread Michael Ellerman
On Thu, 2016-02-25 at 11:08 +1100, Balbir Singh wrote: > > On 25/02/16 01:28, Michael Ellerman wrote: > > In order to support the new -mprofile-kernel ABI, we need to be able to > > call from the module back to ftrace_caller() (in the kernel) without > > using the module's r2. That is because the

Re: [PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller()

2016-02-24 Thread Balbir Singh
On 25/02/16 01:28, Michael Ellerman wrote: > In order to support the new -mprofile-kernel ABI, we need to be able to > call from the module back to ftrace_caller() (in the kernel) without > using the module's r2. That is because the function in this module which > is calling ftrace_caller() may

[PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller()

2016-02-24 Thread Michael Ellerman
In order to support the new -mprofile-kernel ABI, we need to be able to call from the module back to ftrace_caller() (in the kernel) without using the module's r2. That is because the function in this module which is calling ftrace_caller() may not have setup r2, if it doesn't otherwise need it