aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/dumpstack.c
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-08-11 17:43:20 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-13 06:52:53 -0400
commit0eff9f66de79a0707a9c3a2f8528ccfd62100f0b (patch)
tree72c2cdbda141faec9950438b7e7cd02ddcd59705 /arch/sh/kernel/dumpstack.c
parentbf61ad1f870be88676a07bfef69acd59ce10172e (diff)
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 6ab996fc612..005dc1d1146 100644
--- a/arch/sh/kernel/dumpstack.c
+++ b/arch/sh/kernel/dumpstack.c
@@ -6,7 +6,7 @@
6#include <linux/kallsyms.h> 6#include <linux/kallsyms.h>
7#include <linux/ftrace.h> 7#include <linux/ftrace.h>
8#include <linux/debug_locks.h> 8#include <linux/debug_locks.h>
9 9#include <asm/unwinder.h>
10#include <asm/stacktrace.h> 10#include <asm/stacktrace.h>
11 11
12void printk_address(unsigned long address, int reliable) 12void printk_address(unsigned long address, int reliable)
@@ -46,13 +46,10 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
46{ } 46{ }
47#endif 47#endif
48 48
49/* 49void
50 * Unwind the call stack and pass information to the stacktrace_ops 50stack_reader_dump(struct task_struct *task, struct pt_regs *regs,
51 * functions. 51 unsigned long *sp, const struct stacktrace_ops *ops,
52 */ 52 void *data)
53void dump_trace(struct task_struct *task, struct pt_regs *regs,
54 unsigned long *sp, const struct stacktrace_ops *ops,
55 void *data)
56{ 53{
57 struct thread_info *context; 54 struct thread_info *context;
58 int graph = 0; 55 int graph = 0;
@@ -71,8 +68,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
71 } 68 }
72 } 69 }
73} 70}
74EXPORT_SYMBOL(dump_trace);
75
76 71
77static void 72static void
78print_trace_warning_symbol(void *data, char *msg, unsigned long symbol) 73print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
@@ -117,7 +112,7 @@ void show_trace(struct task_struct *tsk, unsigned long *sp,
117 112
118 printk("\nCall trace:\n"); 113 printk("\nCall trace:\n");
119 114
120 dump_trace(tsk, regs, sp, &print_trace_ops, ""); 115 unwind_stack(tsk, regs, sp, &print_trace_ops, "");
121 116
122 printk("\n"); 117 printk("\n");
123 118