xref: /linux/arch/s390/include/asm/cpufeature.h (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
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 	S390_CPU_FEATURE_D288,
19 	MAX_CPU_FEATURES
20 };
21 
22 #define cpu_feature(feature)	(feature)
23 
24 int cpu_have_feature(unsigned int nr);
25 
26 #define cpu_has_bear()		test_facility(193)
27 #define cpu_has_edat1()		test_facility(8)
28 #define cpu_has_edat2()		test_facility(78)
29 #define cpu_has_gs()		test_facility(133)
30 #define cpu_has_idte()		test_facility(3)
31 #define cpu_has_nx()		test_facility(130)
32 #define cpu_has_rdp()		test_facility(194)
33 #define cpu_has_seq_insn()	test_facility(85)
34 #define cpu_has_tlb_lc()	test_facility(51)
35 #define cpu_has_topology()	test_facility(11)
36 #define cpu_has_vx()		test_facility(129)
37 
38 #endif /* __ASM_S390_CPUFEATURE_H */
39