1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Module interface for CPU features
4  *
5  * Copyright IBM Corp. 2015, 2022
6  * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
7  */
8 
9 #ifndef __ASM_S390_CPUFEATURE_H
10 #define __ASM_S390_CPUFEATURE_H
11 
12 #include <asm/facility.h>
13 
14 enum {
15 	S390_CPU_FEATURE_MSA,
16 	S390_CPU_FEATURE_VXRS,
17 	S390_CPU_FEATURE_UV,
18 	MAX_CPU_FEATURES
19 };
20 
21 #define cpu_feature(feature)	(feature)
22 
23 int cpu_have_feature(unsigned int nr);
24 
25 #define cpu_has_bear()		test_facility(193)
26 #define cpu_has_edat1()		test_facility(8)
27 #define cpu_has_edat2()		test_facility(78)
28 #define cpu_has_gs()		test_facility(133)
29 #define cpu_has_idte()		test_facility(3)
30 #define cpu_has_nx()		test_facility(130)
31 #define cpu_has_rdp()		test_facility(194)
32 #define cpu_has_seq_insn()	test_facility(85)
33 #define cpu_has_tlb_lc()	test_facility(51)
34 #define cpu_has_topology()	test_facility(11)
35 #define cpu_has_vx()		test_facility(129)
36 
37 #endif /* __ASM_S390_CPUFEATURE_H */
38