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

kexec.h (557B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2
      3#ifndef _ASM_POWERPC_BOOK3S_64_KEXEC_H_
      4#define _ASM_POWERPC_BOOK3S_64_KEXEC_H_
      5
      6#include <asm/plpar_wrappers.h>
      7
      8#define reset_sprs reset_sprs
      9static inline void reset_sprs(void)
     10{
     11	if (cpu_has_feature(CPU_FTR_ARCH_206)) {
     12		mtspr(SPRN_AMR, 0);
     13		mtspr(SPRN_UAMOR, 0);
     14	}
     15
     16	if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
     17		mtspr(SPRN_IAMR, 0);
     18		if (cpu_has_feature(CPU_FTR_HVMODE))
     19			mtspr(SPRN_CIABR, 0);
     20		else
     21			plpar_set_ciabr(0);
     22	}
     23
     24	/*  Do we need isync()? We are going via a kexec reset */
     25	isync();
     26}
     27
     28#endif