hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/crypto/sha1-ce-glue.c
....@@ -1,14 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * sha1-ce-glue.c - SHA-1 secure hash using ARMv8 Crypto Extensions
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/sha1_base.h>
1412 #include <linux/cpufeature.h>
....@@ -33,7 +31,7 @@
3331 {
3432 struct sha1_state *sctx = shash_desc_ctx(desc);
3533
36
- if (!may_use_simd() ||
34
+ if (!crypto_simd_usable() ||
3735 (sctx->count % SHA1_BLOCK_SIZE) + len < SHA1_BLOCK_SIZE)
3836 return sha1_update_arm(desc, data, len);
3937
....@@ -47,7 +45,7 @@
4745 static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,
4846 unsigned int len, u8 *out)
4947 {
50
- if (!may_use_simd())
48
+ if (!crypto_simd_usable())
5149 return sha1_finup_arm(desc, data, len, out);
5250
5351 kernel_neon_begin();