summaryrefslogtreecommitdiff
path: root/arch/x86/crypto/poly1305_glue.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-05-20 10:09:26 +0300
committerIngo Molnar <mingo@kernel.org>2016-05-20 10:09:26 +0300
commit06cd3d8c14bdd06f49f1c6a06acf219749c5598e (patch)
treeb9dd9ad824e489803072b9517dc01c0d75a4f918 /arch/x86/crypto/poly1305_glue.c
parent0f6ff2bce0d4c3e4ff34f5d2ffb7329025b30844 (diff)
parentbc231d9ede99518b67a77544d9084f15b898fe2e (diff)
downloadlinux-06cd3d8c14bdd06f49f1c6a06acf219749c5598e.tar.xz
Merge branch 'linus' into x86/urgent, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/crypto/poly1305_glue.c')
-rw-r--r--arch/x86/crypto/poly1305_glue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c
index 4264a3d59589..e32142bc071d 100644
--- a/arch/x86/crypto/poly1305_glue.c
+++ b/arch/x86/crypto/poly1305_glue.c
@@ -179,11 +179,12 @@ static struct shash_alg alg = {
static int __init poly1305_simd_mod_init(void)
{
- if (!cpu_has_xmm2)
+ if (!boot_cpu_has(X86_FEATURE_XMM2))
return -ENODEV;
#ifdef CONFIG_AS_AVX2
- poly1305_use_avx2 = cpu_has_avx && cpu_has_avx2 &&
+ poly1305_use_avx2 = boot_cpu_has(X86_FEATURE_AVX) &&
+ boot_cpu_has(X86_FEATURE_AVX2) &&
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
alg.descsize = sizeof(struct poly1305_simd_desc_ctx);
if (poly1305_use_avx2)