]> git.ipfire.org Git - thirdparty/linux.git/commit
lib/crypto: sparc/aes: Migrate optimized code into library
authorEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:20:14 +0000 (11:20 -0800)
committerEric Biggers <ebiggers@kernel.org>
Thu, 15 Jan 2026 22:09:07 +0000 (14:09 -0800)
commit293c7cd5c6c00f3b6fa0072fc4b017a3a13ad1e7
tree60147af97a5ae2dee7d97f2e0c893c5a721f46b2
parent0cab15611e839142f4fd3c8a366acd1f7334b30b
lib/crypto: sparc/aes: Migrate optimized code into library

Move the SPARC64 AES assembly code into lib/crypto/, wire the key
expansion and single-block en/decryption functions up to the AES library
API, and remove the "aes-sparc64" crypto_cipher algorithm.

The result is that both the AES library and crypto_cipher APIs use the
SPARC64 AES opcodes, whereas previously only crypto_cipher did (and it
wasn't enabled by default, which this commit fixes as well).

Note that some of the functions in the SPARC64 AES assembly code are
still used by the AES mode implementations in
arch/sparc/crypto/aes_glue.c.  For now, just export these functions.
These exports will go away once the AES mode implementations are
migrated to the library as well.  (Trying to split up the assembly file
seemed like much more trouble than it would be worth.)

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260112192035.10427-17-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/sparc/crypto/Kconfig
arch/sparc/crypto/Makefile
arch/sparc/crypto/aes_glue.c
include/crypto/aes.h
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/sparc/aes.h [new file with mode: 0644]
lib/crypto/sparc/aes_asm.S [moved from arch/sparc/crypto/aes_asm.S with 100% similarity]