.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2013 - 2017 Linaro Ltd <ard.biesheuvel@linaro.org> |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #include <linux/linkage.h> |
---|
.. | .. |
---|
11 | 8 | |
---|
12 | 9 | .arch armv8-a+crypto |
---|
13 | 10 | |
---|
14 | | -ENTRY(__aes_ce_encrypt) |
---|
| 11 | +SYM_FUNC_START(__aes_ce_encrypt) |
---|
15 | 12 | sub w3, w3, #2 |
---|
16 | 13 | ld1 {v0.16b}, [x2] |
---|
17 | 14 | ld1 {v1.4s}, [x0], #16 |
---|
.. | .. |
---|
37 | 34 | eor v0.16b, v0.16b, v3.16b |
---|
38 | 35 | st1 {v0.16b}, [x1] |
---|
39 | 36 | ret |
---|
40 | | -ENDPROC(__aes_ce_encrypt) |
---|
| 37 | +SYM_FUNC_END(__aes_ce_encrypt) |
---|
41 | 38 | |
---|
42 | | -ENTRY(__aes_ce_decrypt) |
---|
| 39 | +SYM_FUNC_START(__aes_ce_decrypt) |
---|
43 | 40 | sub w3, w3, #2 |
---|
44 | 41 | ld1 {v0.16b}, [x2] |
---|
45 | 42 | ld1 {v1.4s}, [x0], #16 |
---|
.. | .. |
---|
65 | 62 | eor v0.16b, v0.16b, v3.16b |
---|
66 | 63 | st1 {v0.16b}, [x1] |
---|
67 | 64 | ret |
---|
68 | | -ENDPROC(__aes_ce_decrypt) |
---|
| 65 | +SYM_FUNC_END(__aes_ce_decrypt) |
---|
69 | 66 | |
---|
70 | 67 | /* |
---|
71 | 68 | * __aes_ce_sub() - use the aese instruction to perform the AES sbox |
---|
72 | 69 | * substitution on each byte in 'input' |
---|
73 | 70 | */ |
---|
74 | | -ENTRY(__aes_ce_sub) |
---|
| 71 | +SYM_FUNC_START(__aes_ce_sub) |
---|
75 | 72 | dup v1.4s, w0 |
---|
76 | 73 | movi v0.16b, #0 |
---|
77 | 74 | aese v0.16b, v1.16b |
---|
78 | 75 | umov w0, v0.s[0] |
---|
79 | 76 | ret |
---|
80 | | -ENDPROC(__aes_ce_sub) |
---|
| 77 | +SYM_FUNC_END(__aes_ce_sub) |
---|
81 | 78 | |
---|
82 | | -ENTRY(__aes_ce_invert) |
---|
| 79 | +SYM_FUNC_START(__aes_ce_invert) |
---|
83 | 80 | ld1 {v0.4s}, [x1] |
---|
84 | 81 | aesimc v1.16b, v0.16b |
---|
85 | 82 | st1 {v1.4s}, [x0] |
---|
86 | 83 | ret |
---|
87 | | -ENDPROC(__aes_ce_invert) |
---|
| 84 | +SYM_FUNC_END(__aes_ce_invert) |
---|