hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/sparc/kernel/stacktrace.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/sched.h>
23 #include <linux/sched/debug.h>
34 #include <linux/stacktrace.h>
....@@ -57,9 +58,11 @@
5758 trace->entries[trace->nr_entries++] = pc;
5859 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
5960 if ((pc + 8UL) == (unsigned long) &return_to_handler) {
60
- int index = t->curr_ret_stack;
61
- if (t->ret_stack && index >= graph) {
62
- pc = t->ret_stack[index - graph].ret;
61
+ struct ftrace_ret_stack *ret_stack;
62
+ ret_stack = ftrace_graph_get_ret_stack(t,
63
+ graph);
64
+ if (ret_stack) {
65
+ pc = ret_stack->ret;
6366 if (trace->nr_entries <
6467 trace->max_entries)
6568 trace->entries[trace->nr_entries++] = pc;