forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/arm64/crypto/aes-ce-ccm-core.S
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * aesce-ccm-core.S - AES-CCM transform for ARMv8 with Crypto Extensions
34 *
45 * Copyright (C) 2013 - 2017 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 <linux/linkage.h>
....@@ -18,7 +15,7 @@
1815 * void ce_aes_ccm_auth_data(u8 mac[], u8 const in[], u32 abytes,
1916 * u32 *macp, u8 const rk[], u32 rounds);
2017 */
21
-ENTRY(ce_aes_ccm_auth_data)
18
+SYM_FUNC_START(ce_aes_ccm_auth_data)
2219 ldr w8, [x3] /* leftover from prev round? */
2320 ld1 {v0.16b}, [x0] /* load mac */
2421 cbz w8, 1f
....@@ -84,13 +81,13 @@
8481 st1 {v0.16b}, [x0]
8582 10: str w8, [x3]
8683 ret
87
-ENDPROC(ce_aes_ccm_auth_data)
84
+SYM_FUNC_END(ce_aes_ccm_auth_data)
8885
8986 /*
9087 * void ce_aes_ccm_final(u8 mac[], u8 const ctr[], u8 const rk[],
9188 * u32 rounds);
9289 */
93
-ENTRY(ce_aes_ccm_final)
90
+SYM_FUNC_START(ce_aes_ccm_final)
9491 ld1 {v3.4s}, [x2], #16 /* load first round key */
9592 ld1 {v0.16b}, [x0] /* load mac */
9693 cmp w3, #12 /* which key size? */
....@@ -124,7 +121,7 @@
124121 eor v0.16b, v0.16b, v1.16b /* en-/decrypt the mac */
125122 st1 {v0.16b}, [x0] /* store result */
126123 ret
127
-ENDPROC(ce_aes_ccm_final)
124
+SYM_FUNC_END(ce_aes_ccm_final)
128125
129126 .macro aes_ccm_do_crypt,enc
130127 ldr x8, [x6, #8] /* load lower ctr */
....@@ -215,10 +212,10 @@
215212 * u8 const rk[], u32 rounds, u8 mac[],
216213 * u8 ctr[]);
217214 */
218
-ENTRY(ce_aes_ccm_encrypt)
215
+SYM_FUNC_START(ce_aes_ccm_encrypt)
219216 aes_ccm_do_crypt 1
220
-ENDPROC(ce_aes_ccm_encrypt)
217
+SYM_FUNC_END(ce_aes_ccm_encrypt)
221218
222
-ENTRY(ce_aes_ccm_decrypt)
219
+SYM_FUNC_START(ce_aes_ccm_decrypt)
223220 aes_ccm_do_crypt 0
224
-ENDPROC(ce_aes_ccm_decrypt)
221
+SYM_FUNC_END(ce_aes_ccm_decrypt)