162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2022 Loongson Technology Corporation Limited 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci#include <asm/unwind.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciunsigned long unwind_get_return_address(struct unwind_state *state) 862306a36Sopenharmony_ci{ 962306a36Sopenharmony_ci return __unwind_get_return_address(state); 1062306a36Sopenharmony_ci} 1162306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(unwind_get_return_address); 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_civoid unwind_start(struct unwind_state *state, struct task_struct *task, 1462306a36Sopenharmony_ci struct pt_regs *regs) 1562306a36Sopenharmony_ci{ 1662306a36Sopenharmony_ci __unwind_start(state, task, regs); 1762306a36Sopenharmony_ci if (!unwind_done(state) && !__kernel_text_address(state->pc)) 1862306a36Sopenharmony_ci unwind_next_frame(state); 1962306a36Sopenharmony_ci} 2062306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(unwind_start); 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_cibool unwind_next_frame(struct unwind_state *state) 2362306a36Sopenharmony_ci{ 2462306a36Sopenharmony_ci return default_next_frame(state); 2562306a36Sopenharmony_ci} 2662306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(unwind_next_frame); 27