2009-11-10 07:57:01 -07:00
|
|
|
/*
|
|
|
|
* Stack trace support for Microblaze.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
|
|
|
|
* Copyright (C) 2009 PetaLogix
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/stacktrace.h>
|
|
|
|
#include <linux/thread_info.h>
|
|
|
|
#include <linux/ptrace.h>
|
|
|
|
#include <linux/module.h>
|
2010-04-27 10:37:54 -07:00
|
|
|
#include <asm/unwind.h>
|
2009-11-10 07:57:01 -07:00
|
|
|
|
|
|
|
void save_stack_trace(struct stack_trace *trace)
|
|
|
|
{
|
2010-04-27 10:37:54 -07:00
|
|
|
/* Exclude our helper functions from the trace*/
|
|
|
|
trace->skip += 2;
|
|
|
|
microblaze_unwind(NULL, trace);
|
2009-11-10 07:57:01 -07:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(save_stack_trace);
|
|
|
|
|
|
|
|
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
|
|
|
|
{
|
2010-04-27 10:37:54 -07:00
|
|
|
microblaze_unwind(tsk, trace);
|
2009-11-10 07:57:01 -07:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
|