]> 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)
commit0ab4119c006bc1ceed9c6bc67bb83227a871811f
tree8c221344265a0f569343bef9fe86db30fa506c4a
parent3d800e1bf81a0162eb815f95dd06bc9d6e8a643d
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