LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support
authorQing Zhang <zhangqing@loongson.cn>
Sat, 10 Dec 2022 14:40:16 +0000 (22:40 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 14 Dec 2022 00:41:53 +0000 (08:41 +0800)
commitac7127e1cc65aeb578998c992a05dbc80fa18f0f
tree3cc8f20d43cf9a78558dfe799d3b4fe1bcad6fec
parent8778ba2c8a5df11859dc6f2b2205700388b63fd3
LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support

Allow for arguments to be passed in to ftrace_regs by default. If this
is set, then arguments and stack can be found from the pt_regs.

1. HAVE_DYNAMIC_FTRACE_WITH_ARGS don't need special hook for graph
tracer entry point, but instead we can use graph_ops::func function to
install the return_hooker.

2. Livepatch requires this option in the future.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/ftrace.h
arch/loongarch/kernel/ftrace_dyn.c