summaryrefslogtreecommitdiff
path: root/crypto/simd.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-03-12 22:12:51 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2019-03-22 20:57:27 +0800
commite9fb14f04cc3efa3aa0ccc306d82d89fe40fadb9 (patch)
treeb3a065c20239f5894e540b52197076cb30024fab /crypto/simd.c
parent433d686010f5b4c7ba87451c1b98426554c929f6 (diff)
downloadlinux-crypto-e9fb14f04cc3efa3aa0ccc306d82d89fe40fadb9.tar.gz
linux-crypto-e9fb14f04cc3efa3aa0ccc306d82d89fe40fadb9.zip
crypto: simd - convert to use crypto_simd_usable()
Replace all calls to may_use_simd() in the shared SIMD helpers 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 '')
-rw-r--r--crypto/simd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/simd.c b/crypto/simd.c
index 7d62686d..3e3b1d1a 100644
--- a/crypto/simd.c
+++ b/crypto/simd.c
@@ -85,7 +85,7 @@ static int simd_skcipher_encrypt(struct skcipher_request *req)
subreq = skcipher_request_ctx(req);
*subreq = *req;
- if (!may_use_simd() ||
+ if (!crypto_simd_usable() ||
(in_atomic() && cryptd_skcipher_queued(ctx->cryptd_tfm)))
child = &ctx->cryptd_tfm->base;
else
@@ -106,7 +106,7 @@ static int simd_skcipher_decrypt(struct skcipher_request *req)
subreq = skcipher_request_ctx(req);
*subreq = *req;
- if (!may_use_simd() ||
+ if (!crypto_simd_usable() ||
(in_atomic() && cryptd_skcipher_queued(ctx->cryptd_tfm)))
child = &ctx->cryptd_tfm->base;
else
@@ -336,7 +336,7 @@ static int simd_aead_encrypt(struct aead_request *req)
subreq = aead_request_ctx(req);
*subreq = *req;
- if (!may_use_simd() ||
+ if (!crypto_simd_usable() ||
(in_atomic() && cryptd_aead_queued(ctx->cryptd_tfm)))
child = &ctx->cryptd_tfm->base;
else
@@ -357,7 +357,7 @@ static int simd_aead_decrypt(struct aead_request *req)
subreq = aead_request_ctx(req);
*subreq = *req;
- if (!may_use_simd() ||
+ if (!crypto_simd_usable() ||
(in_atomic() && cryptd_aead_queued(ctx->cryptd_tfm)))
child = &ctx->cryptd_tfm->base;
else