summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/ftrace.c
diff options
context:
space:
mode:
authorAlan Kao <alankao@andestech.com>2018-02-13 13:13:21 +0800
committerPalmer Dabbelt <palmer@sifive.com>2018-04-02 19:59:13 -0700
commitb785ec129bd9498ecd6e221e45820b00c6ed4adf (patch)
treef62b6429a1853e0d9627733a2f9ea7b4baeed937 /arch/riscv/kernel/ftrace.c
parentaea4c671fb985e6a9ffc365c43ea6f5e0d737fea (diff)
downloadtalos-obmc-linux-b785ec129bd9498ecd6e221e45820b00c6ed4adf.tar.gz
talos-obmc-linux-b785ec129bd9498ecd6e221e45820b00c6ed4adf.zip
riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support
In walk_stackframe, the pc now receives the address from calling ftrace_graph_ret_addr instead of manual calculation. Note that the original calculation, pc = frame->ra - 4 is buggy when the instruction at the return address happened to be a compressed inst. But since it is not a critical part of ftrace, it is ignored for now to ease the review process. Cc: Greentime Hu <greentime@andestech.com> Signed-off-by: Alan Kao <alankao@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/kernel/ftrace.c')
-rw-r--r--arch/riscv/kernel/ftrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/ftrace.c b/arch/riscv/kernel/ftrace.c
index 48b5353691c3..1157b6b52d25 100644
--- a/arch/riscv/kernel/ftrace.c
+++ b/arch/riscv/kernel/ftrace.c
@@ -151,7 +151,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
return;
err = ftrace_push_return_trace(old, self_addr, &trace.depth,
- frame_pointer, NULL);
+ frame_pointer, parent);
if (err == -EBUSY)
return;
*parent = return_hooker;
OpenPOWER on IntegriCloud