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
reset_sprs(void)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 	/*  Do we need isync()? We are going via a kexec reset */
25 	isync();
26 }
27 
28 #endif
29