1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Most of this ideas comes from x86.
5 * Copyright (C) 2022 Loongson Technology Corporation Limited
10 #include <linux/sched.h>
12 #include <asm/stacktrace.h>
20 char type; /* UNWINDER_XXX */
21 struct stack_info stack_info;
22 struct task_struct *task;
24 unsigned long sp, pc, ra;
27 void unwind_start(struct unwind_state *state,
28 struct task_struct *task, struct pt_regs *regs);
29 bool unwind_next_frame(struct unwind_state *state);
30 unsigned long unwind_get_return_address(struct unwind_state *state);
32 static inline bool unwind_done(struct unwind_state *state)
34 return state->stack_info.type == STACK_TYPE_UNKNOWN;
37 static inline bool unwind_error(struct unwind_state *state)
42 #endif /* _ASM_UNWIND_H */