diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-12-30 08:52:24 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-12-31 06:47:46 -0500 |
commit | 8610d7bf608923157aee95cea30e162ed3417658 (patch) | |
tree | e782e0d67b7ade1361b8b0ccec5be2774114de27 /arch/x86/crypto/aesni-intel_glue.c | |
parent | d781728a1593354f37f9b806ba3482a413f20498 (diff) |
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/aesni-intel_glue.c')
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
1473 | 1473 | ||
1474 | if (!x86_match_cpu(aesni_cpu_id)) | 1474 | if (!x86_match_cpu(aesni_cpu_id)) |
1475 | return -ENODEV; | 1475 | return -ENODEV; |
1476 | #ifdef CONFIG_X86_64 | ||
1476 | #ifdef CONFIG_AS_AVX2 | 1477 | #ifdef CONFIG_AS_AVX2 |
1477 | if (boot_cpu_has(X86_FEATURE_AVX2)) { | 1478 | if (boot_cpu_has(X86_FEATURE_AVX2)) { |
1478 | pr_info("AVX2 version of gcm_enc/dec engaged.\n"); | 1479 | pr_info("AVX2 version of gcm_enc/dec engaged.\n"); |
@@ -1492,6 +1493,7 @@ static int __init aesni_init(void) | |||
1492 | aesni_gcm_enc_tfm = aesni_gcm_enc; | 1493 | aesni_gcm_enc_tfm = aesni_gcm_enc; |
1493 | aesni_gcm_dec_tfm = aesni_gcm_dec; | 1494 | aesni_gcm_dec_tfm = aesni_gcm_dec; |
1494 | } | 1495 | } |
1496 | #endif | ||
1495 | 1497 | ||
1496 | err = crypto_fpu_init(); | 1498 | err = crypto_fpu_init(); |
1497 | if (err) | 1499 | if (err) |