]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/stacktrace.c
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / stacktrace.c
index 0d5268afe80f35fff78b48cd2c559225c4fedb4a..54d1f61aa00778c22cb55552e5fc18197e12d3b8 100644 (file)
 #include <linux/sched.h>
 #include <linux/stacktrace.h>
 #include <linux/thread_info.h>
+#include <linux/module.h>
 #include <asm/ptrace.h>
 
 /*
  * Save stack-backtrace addresses into a stack_trace buffer.
  */
-void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
+void save_stack_trace(struct stack_trace *trace)
 {
-       unsigned long *sp;
-
-       if (!task)
-               task = current;
-       if (task == current)
-               sp = (unsigned long *)current_stack_pointer;
-       else
-               sp = (unsigned long *)task->thread.sp;
+       unsigned long *sp = (unsigned long *)current_stack_pointer;
 
        while (!kstack_end(sp)) {
                unsigned long addr = *sp++;
@@ -41,3 +35,4 @@ void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
                }
        }
 }
+EXPORT_SYMBOL_GPL(save_stack_trace);