diff options
author | Eric Biggers <ebiggers@google.com> | 2019-03-12 22:12:50 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-03-22 20:57:27 +0800 |
commit | e52b7023cdad005756cd91d7c54fa90ef6b43d32 (patch) | |
tree | b2aae39c8c5acfe29a6e95f27fc2539ad2efc547 /arch/arm64/crypto/sm4-ce-glue.c | |
parent | 99680c5e91829453e001ab5f7e6d717e6d2dcb21 (diff) | |
download | linux-e52b7023cdad005756cd91d7c54fa90ef6b43d32.tar.gz linux-e52b7023cdad005756cd91d7c54fa90ef6b43d32.tar.bz2 linux-e52b7023cdad005756cd91d7c54fa90ef6b43d32.zip |
crypto: arm64 - convert to use crypto_simd_usable()
Replace all calls to may_use_simd() in the arm64 crypto code with
crypto_simd_usable(), in order to allow testing the no-SIMD code paths.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto/sm4-ce-glue.c')
-rw-r--r-- | arch/arm64/crypto/sm4-ce-glue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/crypto/sm4-ce-glue.c b/arch/arm64/crypto/sm4-ce-glue.c index 0c4fc223f225..2754c875d39c 100644 --- a/arch/arm64/crypto/sm4-ce-glue.c +++ b/arch/arm64/crypto/sm4-ce-glue.c @@ -3,6 +3,7 @@ #include <asm/neon.h> #include <asm/simd.h> #include <crypto/sm4.h> +#include <crypto/internal/simd.h> #include <linux/module.h> #include <linux/cpufeature.h> #include <linux/crypto.h> @@ -20,7 +21,7 @@ static void sm4_ce_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct crypto_sm4_ctx *ctx = crypto_tfm_ctx(tfm); - if (!may_use_simd()) { + if (!crypto_simd_usable()) { crypto_sm4_encrypt(tfm, out, in); } else { kernel_neon_begin(); @@ -33,7 +34,7 @@ static void sm4_ce_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct crypto_sm4_ctx *ctx = crypto_tfm_ctx(tfm); - if (!may_use_simd()) { + if (!crypto_simd_usable()) { crypto_sm4_decrypt(tfm, out, in); } else { kernel_neon_begin(); |