diff options
author | Borislav Petkov <bp@suse.de> | 2018-09-27 18:36:24 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2018-09-27 18:36:24 +0200 |
commit | d913e8966a8f4b259dd6f11f0c334d865cf9d3aa (patch) | |
tree | 0b354028600f61001317426da875edc50685d36d /arch/nds32/kernel/stacktrace.c | |
parent | 6b58859419554fb824e09cfdd73151a195473cbc (diff) | |
parent | c9661c1e80b609cd038db7c908e061f0535804ef (diff) |
Merge branch 'tip-x86-hygon' into edac-for-4.20
... to pick up a dependent commit and share it with the tip tree, branch
tip:x86/cpu.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/nds32/kernel/stacktrace.c')
-rw-r--r-- | arch/nds32/kernel/stacktrace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/nds32/kernel/stacktrace.c b/arch/nds32/kernel/stacktrace.c index 8b231e910ea6..d974c0c1c65f 100644 --- a/arch/nds32/kernel/stacktrace.c +++ b/arch/nds32/kernel/stacktrace.c @@ -4,6 +4,7 @@ #include <linux/sched/debug.h> #include <linux/sched/task_stack.h> #include <linux/stacktrace.h> +#include <linux/ftrace.h> void save_stack_trace(struct stack_trace *trace) { @@ -16,6 +17,7 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) unsigned long *fpn; int skip = trace->skip; int savesched; + int graph_idx = 0; if (tsk == current) { __asm__ __volatile__("\tori\t%0, $fp, #0\n":"=r"(fpn)); @@ -29,10 +31,12 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) && (fpn >= (unsigned long *)TASK_SIZE)) { unsigned long lpp, fpp; - lpp = fpn[-1]; + lpp = fpn[LP_OFFSET]; fpp = fpn[FP_OFFSET]; if (!__kernel_text_address(lpp)) break; + else + lpp = ftrace_graph_ret_addr(tsk, &graph_idx, lpp, NULL); if (savesched || !in_sched_functions(lpp)) { if (skip) { |