.. | .. |
---|
3 | 3 | #include <asm/neon.h> |
---|
4 | 4 | #include <asm/simd.h> |
---|
5 | 5 | #include <crypto/sm4.h> |
---|
| 6 | +#include <crypto/internal/simd.h> |
---|
6 | 7 | #include <linux/module.h> |
---|
7 | 8 | #include <linux/cpufeature.h> |
---|
8 | 9 | #include <linux/crypto.h> |
---|
.. | .. |
---|
20 | 21 | { |
---|
21 | 22 | const struct crypto_sm4_ctx *ctx = crypto_tfm_ctx(tfm); |
---|
22 | 23 | |
---|
23 | | - if (!may_use_simd()) { |
---|
| 24 | + if (!crypto_simd_usable()) { |
---|
24 | 25 | crypto_sm4_encrypt(tfm, out, in); |
---|
25 | 26 | } else { |
---|
26 | 27 | kernel_neon_begin(); |
---|
.. | .. |
---|
33 | 34 | { |
---|
34 | 35 | const struct crypto_sm4_ctx *ctx = crypto_tfm_ctx(tfm); |
---|
35 | 36 | |
---|
36 | | - if (!may_use_simd()) { |
---|
| 37 | + if (!crypto_simd_usable()) { |
---|
37 | 38 | crypto_sm4_decrypt(tfm, out, in); |
---|
38 | 39 | } else { |
---|
39 | 40 | kernel_neon_begin(); |
---|