sh: Use the new stack unwinder API
Instead of implementing our own stack unwinder via dump_trace() we
should use the new stack unwinder API because it is more modular. This
change allows us to decouple the interface for generating stacktraces
from the implementation of a stack unwinder.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index 6c24a40..45b1add 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -13,6 +13,7 @@
#include <linux/stacktrace.h>
#include <linux/thread_info.h>
#include <linux/module.h>
+#include <asm/unwinder.h>
#include <asm/ptrace.h>
#include <asm/stacktrace.h>
@@ -57,7 +58,7 @@
{
unsigned long *sp = (unsigned long *)current_stack_pointer;
- dump_trace(current, NULL, sp, &save_stack_ops, trace);
+ unwind_stack(current, NULL, sp, &save_stack_ops, trace);
}
EXPORT_SYMBOL_GPL(save_stack_trace);
@@ -89,6 +90,6 @@
{
unsigned long *sp = (unsigned long *)tsk->thread.sp;
- dump_trace(current, NULL, sp, &save_stack_ops_nosched, trace);
+ unwind_stack(current, NULL, sp, &save_stack_ops_nosched, trace);
}
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);