1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 4 */ 5 #ifndef _ASM_BRANCH_H 6 #define _ASM_BRANCH_H 7 8 #include <asm/ptrace.h> 9 exception_era(struct pt_regs * regs)10static inline unsigned long exception_era(struct pt_regs *regs) 11 { 12 return regs->csr_era; 13 } 14 compute_return_era(struct pt_regs * regs)15static inline void compute_return_era(struct pt_regs *regs) 16 { 17 regs->csr_era += 4; 18 } 19 20 #endif /* _ASM_BRANCH_H */ 21