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 9 static 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 if (cpu_has_feature(CPU_FTR_ARCH_31)) { 25 mtspr(SPRN_DEXCR, 0); 26 mtspr(SPRN_HASHKEYR, 0); 27 } 28 29 /* Do we need isync()? We are going via a kexec reset */ 30 isync(); 31 } 32 33 #endif 34