lib/x86/cpu_features: rename PCLMULQDQ feature bit to PCLMUL

This is less unwieldy and is consistent with "DISPATCH_PCLMUL" and with
the "-mno-pclmul" compiler flag.
This commit is contained in:
Eric Biggers 2020-10-05 00:10:08 -07:00
parent 82037908c7
commit f23fd6ca7f
3 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ void setup_cpu_features(void)
features |= X86_CPU_FEATURE_SSE2;
if (IS_SET(features_2, 1))
features |= X86_CPU_FEATURE_PCLMULQDQ;
features |= X86_CPU_FEATURE_PCLMUL;
if (IS_SET(features_2, 27)) { /* OSXSAVE set? */
u64 xcr0 = read_xcr(0);

View File

@ -17,7 +17,7 @@
#if X86_CPU_FEATURES_ENABLED
#define X86_CPU_FEATURE_SSE2 0x00000001
#define X86_CPU_FEATURE_PCLMULQDQ 0x00000002
#define X86_CPU_FEATURE_PCLMUL 0x00000002
#define X86_CPU_FEATURE_AVX 0x00000004
#define X86_CPU_FEATURE_AVX2 0x00000008
#define X86_CPU_FEATURE_BMI2 0x00000010

View File

@ -74,12 +74,12 @@ arch_select_crc32_func(void)
u32 features = get_cpu_features();
#ifdef DISPATCH_PCLMUL_AVX
if ((features & X86_CPU_FEATURE_PCLMULQDQ) &&
if ((features & X86_CPU_FEATURE_PCLMUL) &&
(features & X86_CPU_FEATURE_AVX))
return crc32_pclmul_avx;
#endif
#ifdef DISPATCH_PCLMUL
if (features & X86_CPU_FEATURE_PCLMULQDQ)
if (features & X86_CPU_FEATURE_PCLMUL)
return crc32_pclmul;
#endif
return NULL;