branch.h 388 B

1234567891011121314151617181920
  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. #include <asm/ptrace.h>
  8. static inline unsigned long exception_era(struct pt_regs *regs)
  9. {
  10. return regs->csr_era;
  11. }
  12. static inline void compute_return_era(struct pt_regs *regs)
  13. {
  14. regs->csr_era += 4;
  15. }
  16. #endif /* _ASM_BRANCH_H */