| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
/* |
| 3 |
* Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com) |
| 4 |
* Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef __ASM_STACKTRACE_H |
| 8 |
#define __ASM_STACKTRACE_H |
| 9 |
|
| 10 |
#include <linux/sched.h> |
| 11 |
|
| 12 |
/** |
| 13 |
* arc_unwind_core - Unwind the kernel mode stack for an execution context |
| 14 |
* @tsk: NULL for current task, specific task otherwise |
| 15 |
* @regs: pt_regs used to seed the unwinder {SP, FP, BLINK, PC} |
| 16 |
* If NULL, use pt_regs of @tsk (if !NULL) otherwise |
| 17 |
* use the current values of {SP, FP, BLINK, PC} |
| 18 |
* @consumer_fn: Callback invoked for each frame unwound |
| 19 |
* Returns 0 to continue unwinding, -1 to stop |
| 20 |
* @arg: Arg to callback |
| 21 |
* |
| 22 |
* Returns the address of first function in stack |
| 23 |
* |
| 24 |
* Semantics: |
| 25 |
* - synchronous unwinding (e.g. dump_stack): @tsk NULL, @regs NULL |
| 26 |
* - Asynchronous unwinding of sleeping task: @tsk !NULL, @regs NULL |
| 27 |
* - Asynchronous unwinding of intr/excp etc: @tsk !NULL, @regs !NULL |
| 28 |
*/ |
| 29 |
notrace noinline unsigned int arc_unwind_core( |
| 30 |
struct task_struct *tsk, struct pt_regs *regs, |
| 31 |
int (*consumer_fn) (unsigned int, void *), |
| 32 |
void *arg); |
| 33 |
|
| 34 |
#endif /* __ASM_STACKTRACE_H */ |