diff options
author | Eric Biggers <ebiggers@google.com> | 2019-03-12 22:12:49 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-03-22 20:57:27 +0800 |
commit | 99680c5e91829453e001ab5f7e6d717e6d2dcb21 (patch) | |
tree | 8df83b5be0ccfd591925444694b79771d62abe4d /arch/arm/crypto/crc32-ce-glue.c | |
parent | crypto: x86 - convert to use crypto_simd_usable() (diff) | |
download | linux-99680c5e91829453e001ab5f7e6d717e6d2dcb21.tar.gz linux-99680c5e91829453e001ab5f7e6d717e6d2dcb21.tar.bz2 linux-99680c5e91829453e001ab5f7e6d717e6d2dcb21.zip |
crypto: arm - convert to use crypto_simd_usable()
Replace all calls to may_use_simd() in the arm 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/arm/crypto/crc32-ce-glue.c')
-rw-r--r-- | arch/arm/crypto/crc32-ce-glue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/crypto/crc32-ce-glue.c b/arch/arm/crypto/crc32-ce-glue.c index cd9e93b46c2d..e712c2a7d387 100644 --- a/arch/arm/crypto/crc32-ce-glue.c +++ b/arch/arm/crypto/crc32-ce-glue.c @@ -16,6 +16,7 @@ #include <linux/string.h> #include <crypto/internal/hash.h> +#include <crypto/internal/simd.h> #include <asm/hwcap.h> #include <asm/neon.h> @@ -113,7 +114,7 @@ static int crc32_pmull_update(struct shash_desc *desc, const u8 *data, u32 *crc = shash_desc_ctx(desc); unsigned int l; - if (may_use_simd()) { + if (crypto_simd_usable()) { if ((u32)data % SCALE_F) { l = min_t(u32, length, SCALE_F - ((u32)data % SCALE_F)); @@ -147,7 +148,7 @@ static int crc32c_pmull_update(struct shash_desc *desc, const u8 *data, u32 *crc = shash_desc_ctx(desc); unsigned int l; - if (may_use_simd()) { + if (crypto_simd_usable()) { if ((u32)data % SCALE_F) { l = min_t(u32, length, SCALE_F - ((u32)data % SCALE_F)); |