forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Cast6 Cipher 8-way parallel algorithm (AVX/x86_64)
34 *
....@@ -5,22 +6,6 @@
56 * <Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
67 *
78 * Copyright © 2012-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22
- * USA
23
- *
249 */
2510
2611 #include <linux/linkage.h>
....@@ -262,7 +247,7 @@
262247 .text
263248
264249 .align 8
265
-__cast6_enc_blk8:
250
+SYM_FUNC_START_LOCAL(__cast6_enc_blk8)
266251 /* input:
267252 * %rdi: ctx
268253 * RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2: blocks
....@@ -306,11 +291,11 @@
306291 outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM);
307292 outunpack_blocks(RA2, RB2, RC2, RD2, RTMP, RX, RKRF, RKM);
308293
309
- ret;
310
-ENDPROC(__cast6_enc_blk8)
294
+ RET;
295
+SYM_FUNC_END(__cast6_enc_blk8)
311296
312297 .align 8
313
-__cast6_dec_blk8:
298
+SYM_FUNC_START_LOCAL(__cast6_dec_blk8)
314299 /* input:
315300 * %rdi: ctx
316301 * RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2: encrypted blocks
....@@ -353,10 +338,10 @@
353338 outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM);
354339 outunpack_blocks(RA2, RB2, RC2, RD2, RTMP, RX, RKRF, RKM);
355340
356
- ret;
357
-ENDPROC(__cast6_dec_blk8)
341
+ RET;
342
+SYM_FUNC_END(__cast6_dec_blk8)
358343
359
-ENTRY(cast6_ecb_enc_8way)
344
+SYM_FUNC_START(cast6_ecb_enc_8way)
360345 /* input:
361346 * %rdi: ctx
362347 * %rsi: dst
....@@ -376,10 +361,10 @@
376361
377362 popq %r15;
378363 FRAME_END
379
- ret;
380
-ENDPROC(cast6_ecb_enc_8way)
364
+ RET;
365
+SYM_FUNC_END(cast6_ecb_enc_8way)
381366
382
-ENTRY(cast6_ecb_dec_8way)
367
+SYM_FUNC_START(cast6_ecb_dec_8way)
383368 /* input:
384369 * %rdi: ctx
385370 * %rsi: dst
....@@ -399,10 +384,10 @@
399384
400385 popq %r15;
401386 FRAME_END
402
- ret;
403
-ENDPROC(cast6_ecb_dec_8way)
387
+ RET;
388
+SYM_FUNC_END(cast6_ecb_dec_8way)
404389
405
-ENTRY(cast6_cbc_dec_8way)
390
+SYM_FUNC_START(cast6_cbc_dec_8way)
406391 /* input:
407392 * %rdi: ctx
408393 * %rsi: dst
....@@ -425,10 +410,10 @@
425410 popq %r15;
426411 popq %r12;
427412 FRAME_END
428
- ret;
429
-ENDPROC(cast6_cbc_dec_8way)
413
+ RET;
414
+SYM_FUNC_END(cast6_cbc_dec_8way)
430415
431
-ENTRY(cast6_ctr_8way)
416
+SYM_FUNC_START(cast6_ctr_8way)
432417 /* input:
433418 * %rdi: ctx, CTX
434419 * %rsi: dst
....@@ -453,10 +438,10 @@
453438 popq %r15;
454439 popq %r12;
455440 FRAME_END
456
- ret;
457
-ENDPROC(cast6_ctr_8way)
441
+ RET;
442
+SYM_FUNC_END(cast6_ctr_8way)
458443
459
-ENTRY(cast6_xts_enc_8way)
444
+SYM_FUNC_START(cast6_xts_enc_8way)
460445 /* input:
461446 * %rdi: ctx, CTX
462447 * %rsi: dst
....@@ -480,10 +465,10 @@
480465
481466 popq %r15;
482467 FRAME_END
483
- ret;
484
-ENDPROC(cast6_xts_enc_8way)
468
+ RET;
469
+SYM_FUNC_END(cast6_xts_enc_8way)
485470
486
-ENTRY(cast6_xts_dec_8way)
471
+SYM_FUNC_START(cast6_xts_dec_8way)
487472 /* input:
488473 * %rdi: ctx, CTX
489474 * %rsi: dst
....@@ -507,5 +492,5 @@
507492
508493 popq %r15;
509494 FRAME_END
510
- ret;
511
-ENDPROC(cast6_xts_dec_8way)
495
+ RET;
496
+SYM_FUNC_END(cast6_xts_dec_8way)