]> asedeno.scripts.mit.edu Git - linux.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)
commit336a7b5dd80a2a7b463dc8ede4862425940edeb5
tree8c221344265a0f569343bef9fe86db30fa506c4a
parentf17c4e01e906c568fb03a2e6c2b99e4ee4587fbf
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