diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-11-12 20:55:55 +0300 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2025-11-12 20:55:55 +0300 |
| commit | 065f04001081fa48f24dd95f7095d06402756253 (patch) | |
| tree | 8d6eca52ad3838ac751d1bcc677b29c934ca5752 /lib/crypto/arm/sha256.h | |
| parent | 2dbb6f4a25d38fcf7d6c1c682e45a13e6bbe9562 (diff) | |
| parent | f53d18a4e67eacf665e9d60727d508387f84327b (diff) | |
| download | linux-065f04001081fa48f24dd95f7095d06402756253.tar.xz | |
Merge tag 'scoped-ksimd-for-arm-arm64' into libcrypto-fpsimd-on-stack
Pull scoped ksimd API for ARM and arm64 from Ard Biesheuvel:
"Introduce a more strict replacement API for
kernel_neon_begin()/kernel_neon_end() on both ARM and arm64, and
replace occurrences of the latter pair appearing in lib/crypto"
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'lib/crypto/arm/sha256.h')
| -rw-r--r-- | lib/crypto/arm/sha256.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/crypto/arm/sha256.h b/lib/crypto/arm/sha256.h index 7556457b3094..ae7e52dd6e3b 100644 --- a/lib/crypto/arm/sha256.h +++ b/lib/crypto/arm/sha256.h @@ -22,12 +22,12 @@ static void sha256_blocks(struct sha256_block_state *state, { if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && static_branch_likely(&have_neon) && likely(may_use_simd())) { - kernel_neon_begin(); - if (static_branch_likely(&have_ce)) - sha256_ce_transform(state, data, nblocks); - else - sha256_block_data_order_neon(state, data, nblocks); - kernel_neon_end(); + scoped_ksimd() { + if (static_branch_likely(&have_ce)) + sha256_ce_transform(state, data, nblocks); + else + sha256_block_data_order_neon(state, data, nblocks); + } } else { sha256_block_data_order(state, data, nblocks); } |
