]> git.ipfire.org Git - thirdparty/linux.git/commit
crypto/arm64: sm4-ce-gcm - Avoid pointless yield of the NEON unit
authorArd Biesheuvel <ardb@kernel.org>
Wed, 17 Sep 2025 21:33:30 +0000 (23:33 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 12 Nov 2025 08:52:01 +0000 (09:52 +0100)
commitc13aebfeeed4dc991a80ec1110e1cbac5d902908
tree32ae928c0dd8504628256f0ad8637bb7879cf03a
parent9520ef37713308e2741a5e80c4843d43bbf906eb
crypto/arm64: sm4-ce-gcm - Avoid pointless yield of the NEON unit

Kernel mode NEON sections are now preemptible on arm64, and so there is
no need to yield it when calling APIs that may sleep.

Also, move the calls to kernel_neon_end() to the same scope as
kernel_neon_begin(). This is needed for a subsequent change where a
stack buffer is allocated transparently and passed to
kernel_neon_begin().

While at it, simplify the logic.

Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/arm64/crypto/sm4-ce-gcm-glue.c