linux/arch/arm64/crypto
Ard Biesheuvel 019cd46984 crypto: arm64/aes-ce-cipher - move assembler code to .S file
Most crypto drivers involving kernel mode NEON take care to put the code
that actually touches the NEON register file in a separate compilation
unit, to prevent the compiler from reordering code that preserves or
restores the NEON context with code that may corrupt it. This is
necessary because we currently have no way to express the restrictions
imposed upon use of the NEON in kernel mode in a way that the compiler
understands.

However, in the case of aes-ce-cipher, it did not seem unreasonable to
deviate from this rule, given how it does not seem possible for the
compiler to reorder cross object function calls with asm blocks whose
in- and output constraints reflect that it reads from and writes to
memory.

Now that LTO is being proposed for the arm64 kernel, it is time to
revisit this. The link time optimization may replace the function
calls to kernel_neon_begin() and kernel_neon_end() with instantiations
of the IR that make up its implementation, allowing further reordering
with the asm block.

So let's clean this up, and move the asm() blocks into a separate .S
file.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-By: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-11-29 17:33:30 +11:00
..
.gitignore crypto: arm64/sha2 - add generated .S files to .gitignore 2016-11-29 16:06:56 +08:00
aes-ce-ccm-core.S crypto: arm64/aes-ce-cipher - match round key endianness with generic code 2017-08-04 09:27:19 +08:00
aes-ce-ccm-glue.c crypto: arm64/aes-ce-ccm: add non-SIMD generic fallback 2017-08-04 09:27:21 +08:00
aes-ce-core.S crypto: arm64/aes-ce-cipher - move assembler code to .S file 2017-11-29 17:33:30 +11:00
aes-ce-glue.c crypto: arm64/aes-ce-cipher - move assembler code to .S file 2017-11-29 17:33:30 +11:00
aes-ce-setkey.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aes-ce.S crypto: arm64/aes-ce-cipher - match round key endianness with generic code 2017-08-04 09:27:19 +08:00
aes-cipher-core.S crypto: arm64/aes - avoid expanded lookup tables in the final round 2017-08-04 09:27:26 +08:00
aes-cipher-glue.c crypto: arm64/aes - add scalar implementation 2017-01-13 00:26:49 +08:00
aes-ctr-fallback.h crypto: arm64/aes-blk - add a non-SIMD fallback for synchronous CTR 2017-08-04 09:27:21 +08:00
aes-glue.c crypto: arm64/aes-blk - add a non-SIMD fallback for synchronous CTR 2017-08-04 09:27:21 +08:00
aes-modes.S crypto: arm64/aes - add NEON/Crypto Extensions CBCMAC/CMAC/XCBC driver 2017-02-11 17:50:45 +08:00
aes-neon.S crypto: arm64/aes-neon-blk - tweak performance for low end cores 2017-02-03 18:16:20 +08:00
aes-neonbs-core.S crypto: arm64/aes - don't use IV buffer to return final keystream block 2017-02-03 18:16:20 +08:00
aes-neonbs-glue.c crypto: arm64/aes-bs - implement non-SIMD fallback for AES-CTR 2017-08-04 09:27:22 +08:00
chacha20-neon-core.S crypto: arm64/chacha20 - implement NEON version based on SSE3 code 2017-01-13 00:26:48 +08:00
chacha20-neon-glue.c crypto: arm64/chacha20 - take may_use_simd() into account 2017-08-04 09:27:22 +08:00
crc32-ce-core.S crypto: arm64/crc32 - accelerated support based on x86 SSE implementation 2016-12-07 20:01:22 +08:00
crc32-ce-glue.c crypto: arm64/crc32 - add non-SIMD scalar fallback 2017-08-04 09:27:17 +08:00
crct10dif-ce-core.S crypto: arm64/crct10dif - port x86 SSE implementation to arm64 2016-12-07 20:01:17 +08:00
crct10dif-ce-glue.c crypto: arm64/crct10dif - add non-SIMD generic fallback 2017-08-04 09:27:16 +08:00
ghash-ce-core.S crypto: arm64/ghash - add NEON accelerated fallback for 64-bit PMULL 2017-08-04 09:27:25 +08:00
ghash-ce-glue.c crypto: arm64/ghash - add NEON accelerated fallback for 64-bit PMULL 2017-08-04 09:27:25 +08:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile crypto: arm64/aes-ce-cipher - move assembler code to .S file 2017-11-29 17:33:30 +11:00
sha1-ce-core.S crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
sha1-ce-glue.c crypto: arm64/sha1-ce - add non-SIMD generic fallback 2017-08-04 09:27:18 +08:00
sha2-ce-core.S crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
sha2-ce-glue.c crypto: arm64/sha2-ce - add non-SIMD scalar fallback 2017-08-04 09:27:19 +08:00
sha256-core.S_shipped crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00
sha256-glue.c crypto: arm64/sha2-ce - add non-SIMD scalar fallback 2017-08-04 09:27:19 +08:00
sha512-armv8.pl crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00
sha512-core.S_shipped crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00
sha512-glue.c crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00