Commit 8610d7bf authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Herbert Xu

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d781728a
...@@ -75,7 +75,8 @@ ifeq ($(avx2_supported),yes) ...@@ -75,7 +75,8 @@ ifeq ($(avx2_supported),yes)
serpent-avx2-y := serpent-avx2-asm_64.o serpent_avx2_glue.o serpent-avx2-y := serpent-avx2-asm_64.o serpent_avx2_glue.o
endif endif
aesni-intel-y := aesni-intel_asm.o aesni-intel_avx.o aesni-intel_glue.o fpu.o aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o fpu.o
aesni-intel-$(CONFIG_64BIT) += aesni-intel_avx.o
ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o
sha1-ssse3-y := sha1_ssse3_asm.o sha1_ssse3_glue.o sha1-ssse3-y := sha1_ssse3_asm.o sha1_ssse3_glue.o
crc32c-intel-y := crc32c-intel_glue.o crc32c-intel-y := crc32c-intel_glue.o
......
...@@ -1473,6 +1473,7 @@ static int __init aesni_init(void) ...@@ -1473,6 +1473,7 @@ static int __init aesni_init(void)
if (!x86_match_cpu(aesni_cpu_id)) if (!x86_match_cpu(aesni_cpu_id))
return -ENODEV; return -ENODEV;
#ifdef CONFIG_X86_64
#ifdef CONFIG_AS_AVX2 #ifdef CONFIG_AS_AVX2
if (boot_cpu_has(X86_FEATURE_AVX2)) { if (boot_cpu_has(X86_FEATURE_AVX2)) {
pr_info("AVX2 version of gcm_enc/dec engaged.\n"); pr_info("AVX2 version of gcm_enc/dec engaged.\n");
...@@ -1492,6 +1493,7 @@ static int __init aesni_init(void) ...@@ -1492,6 +1493,7 @@ static int __init aesni_init(void)
aesni_gcm_enc_tfm = aesni_gcm_enc; aesni_gcm_enc_tfm = aesni_gcm_enc;
aesni_gcm_dec_tfm = aesni_gcm_dec; aesni_gcm_dec_tfm = aesni_gcm_dec;
} }
#endif
err = crypto_fpu_init(); err = crypto_fpu_init();
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment