Re: [PATCH v2] lib/crypto: sparc/aes-xts: Add optimization using the AES opcodes
From: Eric Biggers
Date: Sun Oct 04 2026 - 14:03:05 EST
On Fri, Oct 02, 2026 at 09:21:10AM +0200, Stian Halseth wrote:
> +#if IS_ENABLED(CONFIG_CRYPTO_LIB_AES_XTS)
> +ENTRY(aes_sparc64_xts_encrypt_128)
[...]
> +ENTRY(aes_sparc64_xts_encrypt_256)
[...]
> +ENTRY(aes_sparc64_xts_decrypt_128)
[...]
> +ENTRY(aes_sparc64_xts_decrypt_256)
These four functions are almost identical. They should each just invoke
a macro that expands to different code only in the parts that are
actually different, like what the __aes_xts_crypt macro in
lib/crypto/riscv/aes-riscv64-zvkned-zvbb-zvkg.S or the _aes_xts_crypt
macro in lib/crypto/x86/aes-aesni.S do.
This will generate the same object file with way fewer lines of source.
- Eric