arm64: ftrace: Add direct call trampoline samples support
authorFlorent Revest <revest@chromium.org>
Thu, 27 Apr 2023 14:07:00 +0000 (16:07 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 10 Jul 2023 21:51:54 +0000 (17:51 -0400)
commit8c3526fb86060cb53a1f4ca6cc44eb036afcf43e
tree76657abb47a665e755dd4a93971f1e3d77bd0e2b
parent8564c315876ab86fcaf8e7f558d6a84cb2ce5590
arm64: ftrace: Add direct call trampoline samples support

The ftrace samples need per-architecture trampoline implementations
to save and restore argument registers around the calls to
my_direct_func* and to restore polluted registers (eg: x30).

These samples also include <asm/asm-offsets.h> which, on arm64, is not
necessary and redefines previously defined macros (resulting in
warnings) so these includes are guarded by !CONFIG_ARM64.

Link: https://lkml.kernel.org/r/20230427140700.625241-3-revest@chromium.org
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Florent Revest <revest@chromium.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
arch/arm64/Kconfig
samples/ftrace/ftrace-direct-modify.c
samples/ftrace/ftrace-direct-multi-modify.c
samples/ftrace/ftrace-direct-multi.c
samples/ftrace/ftrace-direct-too.c
samples/ftrace/ftrace-direct.c