xref: /linux/arch/loongarch/kernel/unwind_guess.c (revision af2d6148d2a159e1a0862bce5a2c88c1618a2b27)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) 2022 Loongson Technology Corporation Limited
4  */
5 #include <asm/unwind.h>
6 #include <linux/export.h>
7 
8 unsigned long unwind_get_return_address(struct unwind_state *state)
9 {
10 	return __unwind_get_return_address(state);
11 }
12 EXPORT_SYMBOL_GPL(unwind_get_return_address);
13 
14 void unwind_start(struct unwind_state *state, struct task_struct *task,
15 		    struct pt_regs *regs)
16 {
17 	__unwind_start(state, task, regs);
18 	if (!unwind_done(state) && !__kernel_text_address(state->pc))
19 		unwind_next_frame(state);
20 }
21 EXPORT_SYMBOL_GPL(unwind_start);
22 
23 bool unwind_next_frame(struct unwind_state *state)
24 {
25 	return default_next_frame(state);
26 }
27 EXPORT_SYMBOL_GPL(unwind_next_frame);
28