forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/x86/crypto/chacha-avx2-x86_64.S
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * ChaCha 256-bit cipher algorithm, x64 AVX2 functions
34 *
45 * Copyright (C) 2015 Martin Willi
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 as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117
128 #include <linux/linkage.h>
....@@ -38,7 +34,7 @@
3834
3935 .text
4036
41
-ENTRY(chacha_2block_xor_avx2)
37
+SYM_FUNC_START(chacha_2block_xor_avx2)
4238 # %rdi: Input state matrix, s
4339 # %rsi: up to 2 data blocks output, o
4440 # %rdx: up to 2 data blocks input, i
....@@ -197,7 +193,7 @@
197193
198194 .Ldone2:
199195 vzeroupper
200
- ret
196
+ RET
201197
202198 .Lxorpart2:
203199 # xor remaining bytes from partial register into output
....@@ -228,9 +224,9 @@
228224 lea -8(%r10),%rsp
229225 jmp .Ldone2
230226
231
-ENDPROC(chacha_2block_xor_avx2)
227
+SYM_FUNC_END(chacha_2block_xor_avx2)
232228
233
-ENTRY(chacha_4block_xor_avx2)
229
+SYM_FUNC_START(chacha_4block_xor_avx2)
234230 # %rdi: Input state matrix, s
235231 # %rsi: up to 4 data blocks output, o
236232 # %rdx: up to 4 data blocks input, i
....@@ -502,7 +498,7 @@
502498
503499 .Ldone4:
504500 vzeroupper
505
- ret
501
+ RET
506502
507503 .Lxorpart4:
508504 # xor remaining bytes from partial register into output
....@@ -533,9 +529,9 @@
533529 lea -8(%r10),%rsp
534530 jmp .Ldone4
535531
536
-ENDPROC(chacha_4block_xor_avx2)
532
+SYM_FUNC_END(chacha_4block_xor_avx2)
537533
538
-ENTRY(chacha_8block_xor_avx2)
534
+SYM_FUNC_START(chacha_8block_xor_avx2)
539535 # %rdi: Input state matrix, s
540536 # %rsi: up to 8 data blocks output, o
541537 # %rdx: up to 8 data blocks input, i
....@@ -996,7 +992,7 @@
996992 .Ldone8:
997993 vzeroupper
998994 lea -8(%r10),%rsp
999
- ret
995
+ RET
1000996
1001997 .Lxorpart8:
1002998 # xor remaining bytes from partial register into output
....@@ -1022,4 +1018,4 @@
10221018
10231019 jmp .Ldone8
10241020
1025
-ENDPROC(chacha_8block_xor_avx2)
1021
+SYM_FUNC_END(chacha_8block_xor_avx2)