hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/crypto/sha512-neon-glue.c
....@@ -1,14 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * sha512-neon-glue.c - accelerated SHA-384/512 for ARM NEON
34 *
45 * Copyright (C) 2015 Linaro Ltd <ard.biesheuvel@linaro.org>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #include <crypto/internal/hash.h>
9
+#include <crypto/internal/simd.h>
1210 #include <crypto/sha.h>
1311 #include <crypto/sha512_base.h>
1412 #include <linux/crypto.h>
....@@ -30,7 +28,7 @@
3028 {
3129 struct sha512_state *sctx = shash_desc_ctx(desc);
3230
33
- if (!may_use_simd() ||
31
+ if (!crypto_simd_usable() ||
3432 (sctx->count[0] % SHA512_BLOCK_SIZE) + len < SHA512_BLOCK_SIZE)
3533 return sha512_arm_update(desc, data, len);
3634
....@@ -45,7 +43,7 @@
4543 static int sha512_neon_finup(struct shash_desc *desc, const u8 *data,
4644 unsigned int len, u8 *out)
4745 {
48
- if (!may_use_simd())
46
+ if (!crypto_simd_usable())
4947 return sha512_arm_finup(desc, data, len, out);
5048
5149 kernel_neon_begin();