1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * This file is subject to the terms and conditions of the GNU General Public 4 * License. See the file "COPYING" in the main directory of this archive 5 * for more details. 6 * 7 * Copyright (C) 2020 Loongson Technology Co., Ltd. 8 */ 9 #ifndef _ASM_BRANCH_H 10 #define _ASM_BRANCH_H 11 12 #include <asm/ptrace.h> 13 exception_era(struct pt_regs * regs)14static inline unsigned long exception_era(struct pt_regs *regs) 15 { 16 return regs->csr_era; 17 } 18 compute_return_era(struct pt_regs * regs)19static inline int compute_return_era(struct pt_regs *regs) 20 { 21 regs->csr_era += 4; 22 return 0; 23 } 24 25 #endif /* _ASM_BRANCH_H */ 26