mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API
Before modifying the prototypes of kernel_neon_begin() and kernel_neon_end() to accommodate kernel mode FP/SIMD state buffers allocated on the stack, move arm64 to the new 'ksimd' scoped guard API, which encapsulates the calls to those functions. For symmetry, do the same for 32-bit ARM too. Reviewed-by: Eric Biggers <ebiggers@kernel.org> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
@@ -19,9 +19,8 @@ static void sha512_blocks(struct sha512_block_state *state,
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) &&
|
||||
static_branch_likely(&have_neon) && likely(may_use_simd())) {
|
||||
kernel_neon_begin();
|
||||
sha512_block_data_order_neon(state, data, nblocks);
|
||||
kernel_neon_end();
|
||||
scoped_ksimd()
|
||||
sha512_block_data_order_neon(state, data, nblocks);
|
||||
} else {
|
||||
sha512_block_data_order(state, data, nblocks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user