aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/dumpstack.c
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-08-11 22:43:20 +0100
committerPaul Mundt <lethal@linux-sh.org>2009-08-13 19:52:53 +0900
commit0eff9f66de79a0707a9c3a2f8528ccfd62100f0b (patch)
tree72c2cdbda141faec9950438b7e7cd02ddcd59705 /arch/sh/kernel/dumpstack.c
parentsh: Allow multiple stack unwinders to be setup (diff)
downloadlinux-dev-0eff9f66de79a0707a9c3a2f8528ccfd62100f0b.tar.xz
linux-dev-0eff9f66de79a0707a9c3a2f8528ccfd62100f0b.zip
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>
Diffstat (limited to 'arch/sh/kernel/dumpstack.c')
-rw-r--r--arch/sh/kernel/dumpstack.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/sh/kernel/dumpstack.c b/arch/sh/kernel/dumpstack.c
index 6ab996fc6121..005dc1d11460 100644
--- a/arch/sh/kernel/dumpstack.c
+++ b/arch/sh/kernel/dumpstack.c
@@ -6,7 +6,7 @@
#include <linux/kallsyms.h>
#include <linux/ftrace.h>
#include <linux/debug_locks.h>
-
+#include <asm/unwinder.h>
#include <asm/stacktrace.h>
void printk_address(unsigned long address, int reliable)
@@ -46,13 +46,10 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
{ }
#endif
-/*
- * Unwind the call stack and pass information to the stacktrace_ops
- * functions.
- */
-void dump_trace(struct task_struct *task, struct pt_regs *regs,
- unsigned long *sp, const struct stacktrace_ops *ops,
- void *data)
+void
+stack_reader_dump(struct task_struct *task, struct pt_regs *regs,
+ unsigned long *sp, const struct stacktrace_ops *ops,
+ void *data)
{
struct thread_info *context;
int graph = 0;
@@ -71,8 +68,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
}
}
}
-EXPORT_SYMBOL(dump_trace);
-
static void
print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
@@ -117,7 +112,7 @@ void show_trace(struct task_struct *tsk, unsigned long *sp,
printk("\nCall trace:\n");
- dump_trace(tsk, regs, sp, &print_trace_ops, "");
+ unwind_stack(tsk, regs, sp, &print_trace_ops, "");
printk("\n");