2009-11-10 22:57:01 +08: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.
|
|
|
|
*/
|
|
|
|
|
2013-02-01 20:10:35 +08:00
|
|
|
#include <linux/export.h>
|
2009-11-10 22:57:01 +08:00
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/stacktrace.h>
|
|
|
|
#include <linux/thread_info.h>
|
|
|
|
#include <linux/ptrace.h>
|
2010-04-28 01:37:54 +08:00
|
|
|
#include <asm/unwind.h>
|
2009-11-10 22:57:01 +08:00
|
|
|
|
|
|
|
void save_stack_trace(struct stack_trace *trace)
|
|
|
|
{
|
2010-04-28 01:37:54 +08:00
|
|
|
/* Exclude our helper functions from the trace*/
|
|
|
|
trace->skip += 2;
|
|
|
|
microblaze_unwind(NULL, trace);
|
2009-11-10 22:57:01 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(save_stack_trace);
|
|
|
|
|
|
|
|
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
|
|
|
|
{
|
2010-04-28 01:37:54 +08:00
|
|
|
microblaze_unwind(tsk, trace);
|
2009-11-10 22:57:01 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
|