diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
commit | 57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch) | |
tree | 5e910f0e82173f4ef4f51111366a3f1299037a7b /arch/microblaze/kernel/stacktrace.c |
Initial import
Diffstat (limited to 'arch/microblaze/kernel/stacktrace.c')
-rw-r--r-- | arch/microblaze/kernel/stacktrace.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/stacktrace.c b/arch/microblaze/kernel/stacktrace.c new file mode 100644 index 000000000..b4debe283 --- /dev/null +++ b/arch/microblaze/kernel/stacktrace.c @@ -0,0 +1,31 @@ +/* + * 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/export.h> +#include <linux/sched.h> +#include <linux/stacktrace.h> +#include <linux/thread_info.h> +#include <linux/ptrace.h> +#include <asm/unwind.h> + +void save_stack_trace(struct stack_trace *trace) +{ + /* Exclude our helper functions from the trace*/ + trace->skip += 2; + microblaze_unwind(NULL, trace); +} +EXPORT_SYMBOL_GPL(save_stack_trace); + +void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) +{ + microblaze_unwind(tsk, trace); +} +EXPORT_SYMBOL_GPL(save_stack_trace_tsk); |