2 * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
3 * Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
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.
10 #ifndef __ASM_STACKTRACE_H
11 #define __ASM_STACKTRACE_H
13 #include <linux/sched.h>
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
25 * Returns the address of first function in stack
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
32 notrace noinline
unsigned int arc_unwind_core(
33 struct task_struct
*tsk
, struct pt_regs
*regs
,
34 int (*consumer_fn
) (unsigned int, void *),
37 #endif /* __ASM_STACKTRACE_H */