cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

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 */