Message ID | 20190313051252.2917-8-ebiggers@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: test the !may_use_simd() fallback code | expand |
On Wed, 13 Mar 2019 at 06:15, Eric Biggers <ebiggers@kernel.org> wrote: > > From: Eric Biggers <ebiggers@google.com> > > 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> > --- > crypto/simd.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/crypto/simd.c b/crypto/simd.c > index 7d62686d3a3f..3e3b1d1a6b1f 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 > -- > 2.21.0 >
diff --git a/crypto/simd.c b/crypto/simd.c index 7d62686d3a3f..3e3b1d1a6b1f 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