From 8610d7bf608923157aee95cea30e162ed3417658 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 30 Dec 2013 15:52:24 +0200 Subject: crypto: aesni - fix build on x86 (32bit) It seems commit d764593a "crypto: aesni - AVX and AVX2 version of AESNI-GCM encode and decode" breaks a build on x86_32 since it's designed only for x86_64. This patch makes a compilation unit conditional to CONFIG_64BIT and functions usage to CONFIG_X86_64. Signed-off-by: Andy Shevchenko Signed-off-by: Herbert Xu --- arch/x86/crypto/aesni-intel_glue.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/x86/crypto/aesni-intel_glue.c') diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 3ae311dd684e..948ad0e77741 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c @@ -1473,6 +1473,7 @@ static int __init aesni_init(void) if (!x86_match_cpu(aesni_cpu_id)) return -ENODEV; +#ifdef CONFIG_X86_64 #ifdef CONFIG_AS_AVX2 if (boot_cpu_has(X86_FEATURE_AVX2)) { pr_info("AVX2 version of gcm_enc/dec engaged.\n"); @@ -1492,6 +1493,7 @@ static int __init aesni_init(void) aesni_gcm_enc_tfm = aesni_gcm_enc; aesni_gcm_dec_tfm = aesni_gcm_dec; } +#endif err = crypto_fpu_init(); if (err) -- cgit