x86/cpufeature: Replace cpu_has_avx with boot_cpu_has() usage
[linux-2.6-block.git] / arch / x86 / crypto / chacha20_glue.c
index cea061e137da6ad87bb2e6e2c5117b46c5fbb4a1..2d5c2e0bd939b9e267102adf3577a91e53abfce1 100644 (file)
@@ -129,7 +129,8 @@ static int __init chacha20_simd_mod_init(void)
                return -ENODEV;
 
 #ifdef CONFIG_AS_AVX2
-       chacha20_use_avx2 = cpu_has_avx && boot_cpu_has(X86_FEATURE_AVX2) &&
+       chacha20_use_avx2 = boot_cpu_has(X86_FEATURE_AVX) &&
+                           boot_cpu_has(X86_FEATURE_AVX2) &&
                            cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
 #endif
        return crypto_register_alg(&alg);