forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/arm64/crypto/sm4-ce-glue.c
....@@ -3,6 +3,7 @@
33 #include <asm/neon.h>
44 #include <asm/simd.h>
55 #include <crypto/sm4.h>
6
+#include <crypto/internal/simd.h>
67 #include <linux/module.h>
78 #include <linux/cpufeature.h>
89 #include <linux/crypto.h>
....@@ -20,7 +21,7 @@
2021 {
2122 const struct crypto_sm4_ctx *ctx = crypto_tfm_ctx(tfm);
2223
23
- if (!may_use_simd()) {
24
+ if (!crypto_simd_usable()) {
2425 crypto_sm4_encrypt(tfm, out, in);
2526 } else {
2627 kernel_neon_begin();
....@@ -33,7 +34,7 @@
3334 {
3435 const struct crypto_sm4_ctx *ctx = crypto_tfm_ctx(tfm);
3536
36
- if (!may_use_simd()) {
37
+ if (!crypto_simd_usable()) {
3738 crypto_sm4_decrypt(tfm, out, in);
3839 } else {
3940 kernel_neon_begin();