]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/crypto: arm/blake2b: Move to scoped ksimd API
authorArd Biesheuvel <ardb@kernel.org>
Wed, 12 Nov 2025 09:03:18 +0000 (10:03 +0100)
committerEric Biggers <ebiggers@kernel.org>
Wed, 12 Nov 2025 17:57:52 +0000 (09:57 -0800)
Even though ARM's versions of kernel_neon_begin()/_end() are not being
changed, update the newly migrated ARM blake2b to the scoped ksimd API
so that all ARM and arm64 in lib/crypto remains consistent in this
manner.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/arm/blake2b.h

index 1b9154d119db43ca7a6ada2bf91fa078cef9e35f..5c76498521e67ef998fa8d26e8b4a93a48ee5bee 100644 (file)
@@ -24,9 +24,8 @@ static void blake2b_compress(struct blake2b_ctx *ctx,
                const size_t blocks = min_t(size_t, nblocks,
                                            SZ_4K / BLAKE2B_BLOCK_SIZE);
 
-               kernel_neon_begin();
-               blake2b_compress_neon(ctx, data, blocks, inc);
-               kernel_neon_end();
+               scoped_ksimd()
+                       blake2b_compress_neon(ctx, data, blocks, inc);
 
                data += blocks * BLAKE2B_BLOCK_SIZE;
                nblocks -= blocks;