LoongArch/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support
authorQing Zhang <zhangqing@loongson.cn>
Sat, 10 Dec 2022 14:40:21 +0000 (22:40 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 14 Dec 2022 00:41:54 +0000 (08:41 +0800)
commita51ac5246d2505b58229242959d2bc73d113ca50
treea51e352384af8317ace4baf429c9457ad25d9435
parentac7127e1cc65aeb578998c992a05dbc80fa18f0f
LoongArch/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support

ftrace_graph_ret_addr() can be called by stack unwinding code to convert
a found stack return address ('ret') to its original value, in case the
function graph tracer has modified it to be 'return_to_handler'. If the
hasn't been modified, the unchanged value of 'ret' is returned.

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