aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/aegis128-neon.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/aegis128-neon.c')
-rw-r--r--crypto/aegis128-neon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/aegis128-neon.c b/crypto/aegis128-neon.c
index c1c0a1686f67..751f9c195aa4 100644
--- a/crypto/aegis128-neon.c
+++ b/crypto/aegis128-neon.c
@@ -14,9 +14,15 @@ void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src,
void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src,
unsigned int size);
+int aegis128_have_aes_insn __ro_after_init;
+
bool crypto_aegis128_have_simd(void)
{
- return cpu_have_feature(cpu_feature(AES));
+ if (cpu_have_feature(cpu_feature(AES))) {
+ aegis128_have_aes_insn = 1;
+ return true;
+ }
+ return IS_ENABLED(CONFIG_ARM64);
}
void crypto_aegis128_update_simd(union aegis_block *state, const void *msg)