1 /* 2 * SPDX-License-Identifier: GPL-2.0-or-later 3 * Host specific cpu identification for x86. 4 */ 5 6 #ifndef HOST_CPUINFO_H 7 #define HOST_CPUINFO_H 8 9 /* Digested version of <cpuid.h> */ 10 11 #define CPUINFO_ALWAYS (1u << 0) /* so cpuinfo is nonzero */ 12 #define CPUINFO_OSXSAVE (1u << 1) 13 #define CPUINFO_MOVBE (1u << 2) 14 #define CPUINFO_LZCNT (1u << 3) 15 #define CPUINFO_POPCNT (1u << 4) 16 #define CPUINFO_BMI1 (1u << 5) 17 #define CPUINFO_BMI2 (1u << 6) 18 #define CPUINFO_SSE2 (1u << 7) 19 #define CPUINFO_AVX1 (1u << 9) 20 #define CPUINFO_AVX2 (1u << 10) 21 #define CPUINFO_AVX512F (1u << 11) 22 #define CPUINFO_AVX512VL (1u << 12) 23 #define CPUINFO_AVX512BW (1u << 13) 24 #define CPUINFO_AVX512DQ (1u << 14) 25 #define CPUINFO_AVX512VBMI2 (1u << 15) 26 #define CPUINFO_ATOMIC_VMOVDQA (1u << 16) 27 #define CPUINFO_ATOMIC_VMOVDQU (1u << 17) 28 #define CPUINFO_AES (1u << 18) 29 #define CPUINFO_PCLMUL (1u << 19) 30 31 /* Initialized with a constructor. */ 32 extern unsigned cpuinfo; 33 34 /* 35 * We cannot rely on constructor ordering, so other constructors must 36 * use the function interface rather than the variable above. 37 */ 38 unsigned cpuinfo_init(void); 39 40 #endif /* HOST_CPUINFO_H */ 41