branch.h (388B)
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 10static inline unsigned long exception_era(struct pt_regs *regs) 11{ 12 return regs->csr_era; 13} 14 15static inline void compute_return_era(struct pt_regs *regs) 16{ 17 regs->csr_era += 4; 18} 19 20#endif /* _ASM_BRANCH_H */