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

runtime_instr.h (634B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef _RUNTIME_INSTR_H
      3#define _RUNTIME_INSTR_H
      4
      5#include <uapi/asm/runtime_instr.h>
      6
      7extern struct runtime_instr_cb runtime_instr_empty_cb;
      8
      9static inline void save_ri_cb(struct runtime_instr_cb *cb_prev)
     10{
     11	if (cb_prev)
     12		store_runtime_instr_cb(cb_prev);
     13}
     14
     15static inline void restore_ri_cb(struct runtime_instr_cb *cb_next,
     16				 struct runtime_instr_cb *cb_prev)
     17{
     18	if (cb_next)
     19		load_runtime_instr_cb(cb_next);
     20	else if (cb_prev)
     21		load_runtime_instr_cb(&runtime_instr_empty_cb);
     22}
     23
     24struct task_struct;
     25
     26void runtime_instr_release(struct task_struct *tsk);
     27
     28#endif /* _RUNTIME_INSTR_H */