]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/crc: Use underlying functions instead of crypto_simd_usable()
authorEric Biggers <ebiggers@kernel.org>
Mon, 11 Aug 2025 18:26:31 +0000 (11:26 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 11 Aug 2025 18:28:00 +0000 (11:28 -0700)
commitc2a0c5156a40c40edb0cce80ce11c97ab39c67e3
treee7b920ccfde2ab0415df8fbc4ef9b568e9b684d2
parent842ec21357f15ff722695dd87daf99823f297185
lib/crc: Use underlying functions instead of crypto_simd_usable()

Since crc_kunit now tests the fallback code paths without using
crypto_simd_disabled_for_test, make the CRC code just use the underlying
may_use_simd() and irq_fpu_usable() functions directly instead of
crypto_simd_usable().  This eliminates an unnecessary layer.

Take the opportunity to add likely() and unlikely() annotations as well.

Link: https://lore.kernel.org/r/20250811182631.376302-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crc/arm/crc-t10dif.h
lib/crc/arm/crc32.h
lib/crc/arm64/crc-t10dif.h
lib/crc/arm64/crc32.h
lib/crc/powerpc/crc-t10dif.h
lib/crc/powerpc/crc32.h
lib/crc/x86/crc-pclmul-template.h
lib/crc/x86/crc32.h