powerpc/ftrace: Activate HAVE_DYNAMIC_FTRACE_WITH_REGS on PPC32
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 28 Oct 2021 12:24:04 +0000 (14:24 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 29 Nov 2021 11:49:29 +0000 (22:49 +1100)
commit7dfbfb87c243cf08bc2b9cc23699ac207b726458
tree5f9777a60d4fb9baaa913fad98c325ea409bd334
parentc93d4f6ecf4b0699d0f2088f7bd9cd09af45d65a
powerpc/ftrace: Activate HAVE_DYNAMIC_FTRACE_WITH_REGS on PPC32

Unlike PPC64, PPC32 doesn't require any special compiler option
to get _mcount() call not clobbering registers.

Provide ftrace_regs_caller() and ftrace_regs_call() and activate
HAVE_DYNAMIC_FTRACE_WITH_REGS.

That's heavily copied from ftrace_64_mprofile.S

For the time being leave livepatching aside, it will come with
following patch.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1862dc7719855cc2a4eec80920d94c955877557e.1635423081.git.christophe.leroy@csgroup.eu
arch/powerpc/Kconfig
arch/powerpc/kernel/module_32.c
arch/powerpc/kernel/trace/ftrace.c
arch/powerpc/kernel/trace/ftrace_32.S