]> git.ipfire.org Git - thirdparty/linux.git/commit
lib/crypto: powerpc/aes: Migrate SPE optimized code into library
authorEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:20:10 +0000 (11:20 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:39:58 +0000 (11:39 -0800)
commit0892c91b81cc889c95dc03b095b9f4a6fdf93106
treefa5233da0bff27c086ebff556886ec5f5d888b7a
parent2b1ef7aeeb184ee78523f3d24e221296574c6f2d
lib/crypto: powerpc/aes: Migrate SPE optimized code into library

Move the PowerPC SPE 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 superseded "aes-ppc-spe" crypto_cipher algorithm.

The result is that both the AES library and crypto_cipher APIs are now
optimized with SPE, whereas previously only crypto_cipher was (and
optimizations weren't enabled by default, which this commit fixes too).

Note that many of the functions in the PowerPC SPE assembly code are
still used by the AES mode implementations in arch/powerpc/crypto/.  For
now, just export these functions.  These exports will go away once the
AES modes are migrated to the library as well.  (Trying to split up the
assembly files 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-13-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
12 files changed:
arch/powerpc/crypto/Kconfig
arch/powerpc/crypto/Makefile
arch/powerpc/crypto/aes-spe-glue.c
include/crypto/aes.h
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/powerpc/aes-spe-core.S [moved from arch/powerpc/crypto/aes-spe-core.S with 100% similarity]
lib/crypto/powerpc/aes-spe-keys.S [moved from arch/powerpc/crypto/aes-spe-keys.S with 100% similarity]
lib/crypto/powerpc/aes-spe-modes.S [moved from arch/powerpc/crypto/aes-spe-modes.S with 100% similarity]
lib/crypto/powerpc/aes-spe-regs.h [moved from arch/powerpc/crypto/aes-spe-regs.h with 100% similarity]
lib/crypto/powerpc/aes-tab-4k.S [moved from arch/powerpc/crypto/aes-tab-4k.S with 100% similarity]
lib/crypto/powerpc/aes.h [new file with mode: 0644]