diff options
Diffstat (limited to 'arch/arc/include/asm/stacktrace.h')
| -rw-r--r-- | arch/arc/include/asm/stacktrace.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arc/include/asm/stacktrace.h b/arch/arc/include/asm/stacktrace.h new file mode 100644 index 000000000000..b29b6064ea14 --- /dev/null +++ b/arch/arc/include/asm/stacktrace.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com) | ||
| 3 | * Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __ASM_STACKTRACE_H | ||
| 11 | #define __ASM_STACKTRACE_H | ||
| 12 | |||
| 13 | #include <linux/sched.h> | ||
| 14 | |||
| 15 | /** | ||
| 16 | * arc_unwind_core - Unwind the kernel mode stack for an execution context | ||
| 17 | * @tsk: NULL for current task, specific task otherwise | ||
| 18 | * @regs: pt_regs used to seed the unwinder {SP, FP, BLINK, PC} | ||
| 19 | * If NULL, use pt_regs of @tsk (if !NULL) otherwise | ||
| 20 | * use the current values of {SP, FP, BLINK, PC} | ||
| 21 | * @consumer_fn: Callback invoked for each frame unwound | ||
| 22 | * Returns 0 to continue unwinding, -1 to stop | ||
| 23 | * @arg: Arg to callback | ||
| 24 | * | ||
| 25 | * Returns the address of first function in stack | ||
| 26 | * | ||
| 27 | * Semantics: | ||
| 28 | * - synchronous unwinding (e.g. dump_stack): @tsk NULL, @regs NULL | ||
| 29 | * - Asynchronous unwinding of sleeping task: @tsk !NULL, @regs NULL | ||
| 30 | * - Asynchronous unwinding of intr/excp etc: @tsk !NULL, @regs !NULL | ||
| 31 | */ | ||
| 32 | notrace noinline unsigned int arc_unwind_core( | ||
| 33 | struct task_struct *tsk, struct pt_regs *regs, | ||
| 34 | int (*consumer_fn) (unsigned int, void *), | ||
| 35 | void *arg); | ||
| 36 | |||
| 37 | #endif /* __ASM_STACKTRACE_H */ | ||
