diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-12-07 18:51:27 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-12-22 14:21:02 +0100 |
commit | 945626db0961d8388543b2c96b6f16df57947392 (patch) | |
tree | 71ea05f93146e0eab58068e071ea786bd12b80c9 /arch/sparc/kernel/traps_64.c | |
parent | powerpc/frace: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack (diff) | |
download | linux-945626db0961d8388543b2c96b6f16df57947392.tar.xz linux-945626db0961d8388543b2c96b6f16df57947392.zip |
sparc64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack
The structure of the ret_stack array on the task struct is going to
change, and accessing it directly via the curr_ret_stack index will no
longer give the ret_stack entry that holds the return address. To access
that, architectures must now use ftrace_graph_get_ret_stack() to get the
associated ret_stack that matches the saved return address.
Cc: sparclinux@vger.kernel.org
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/sparc/kernel/traps_64.c')
-rw-r--r-- | arch/sparc/kernel/traps_64.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index aa624ed79db1..0cd02a64a451 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c @@ -2502,9 +2502,10 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) printk(" [%016lx] %pS\n", pc, (void *) pc); #ifdef CONFIG_FUNCTION_GRAPH_TRACER if ((pc + 8UL) == (unsigned long) &return_to_handler) { - int index = tsk->curr_ret_stack; - if (tsk->ret_stack && index >= graph) { - pc = tsk->ret_stack[index - graph].ret; + struct ftrace_ret_stack *ret_stack; + ret_stack = ftrace_graph_get_ret_stack(tsk, graph); + if (ret_stack) { + pc = ret_stack->ret; printk(" [%016lx] %pS\n", pc, (void *) pc); graph++; } |