aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/stacktrace.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/stacktrace.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/stacktrace.c')
-rw-r--r--arch/sh/kernel/stacktrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index 6c24a400b05e..45b1adde3abe 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -13,6 +13,7 @@
13#include <linux/stacktrace.h> 13#include <linux/stacktrace.h>
14#include <linux/thread_info.h> 14#include <linux/thread_info.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <asm/unwinder.h>
16#include <asm/ptrace.h> 17#include <asm/ptrace.h>
17#include <asm/stacktrace.h> 18#include <asm/stacktrace.h>
18 19
@@ -57,7 +58,7 @@ void save_stack_trace(struct stack_trace *trace)
57{ 58{
58 unsigned long *sp = (unsigned long *)current_stack_pointer; 59 unsigned long *sp = (unsigned long *)current_stack_pointer;
59 60
60 dump_trace(current, NULL, sp, &save_stack_ops, trace); 61 unwind_stack(current, NULL, sp, &save_stack_ops, trace);
61} 62}
62EXPORT_SYMBOL_GPL(save_stack_trace); 63EXPORT_SYMBOL_GPL(save_stack_trace);
63 64
@@ -89,6 +90,6 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
89{ 90{
90 unsigned long *sp = (unsigned long *)tsk->thread.sp; 91 unsigned long *sp = (unsigned long *)tsk->thread.sp;
91 92
92 dump_trace(current, NULL, sp, &save_stack_ops_nosched, trace); 93 unwind_stack(current, NULL, sp, &save_stack_ops_nosched, trace);
93} 94}
94EXPORT_SYMBOL_GPL(save_stack_trace_tsk); 95EXPORT_SYMBOL_GPL(save_stack_trace_tsk);