]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/module: Create a special stub for ftrace_caller()
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 3 Mar 2016 04:26:56 +0000 (15:26 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Mar 2016 03:53:54 +0000 (14:53 +1100)
commitdc61bb78d9b794788e3664db0eb0bc84ebb363fb
tree8c221344265a0f569343bef9fe86db30fa506c4a
parenta24410c770e3d9b9069fecc160195dbb4dc56619
powerpc/module: Create a special stub for ftrace_caller()

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 (ie. it accesses no globals).

To make that work we add a new stub which is used for calling
ftrace_caller(), which uses the kernel toc instead of the module toc.

Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/module_64.c