crypto: stm32 - remove crc32 and crc32c support
authorEric Biggers <ebiggers@kernel.org>
Sun, 1 Jun 2025 19:34:41 +0000 (12:34 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:31:56 +0000 (09:31 -0700)
commit5b019bb25fbfde0b148895a1676f4bfe7a264156
tree0084533a6b0f82fc608b8a02bfe4bda6aacf808c
parent4be6cc8222a44e3165cd41731535c8e96b5e8104
crypto: stm32 - remove crc32 and crc32c support

Remove the crc32 and crc32c support from the stm32 driver.  Since it's
not wired up to the CRC library, almost no CRC user in the kernel can
actually be taking advantage of it, so it's effectively dead code.

Support for this hardware could be migrated to the CRC library, but
there doesn't seem to be much point.  This CRC engine is present only on
a couple older SoCs that lacked CRC instructions.

Even for those SoCs, it probably wouldn't be worthwhile.  This driver
has to deal with things like locking and runtime power management that
do not exist in software CRC code and are a source of bugs (as is clear
from the commit log) and add significant overhead to the processing of
short messages, which are common.  The patch that added this driver
seemed to justify it based purely on a microbenchmark on Cortex-M7 on
long messages, not a real use case.  These days, if this driver were to
be used at all it would likely be on Cortex-A7 instead.  This CRC engine
is also not supported by QEMU, making the driver not easily testable.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Fabien Dessenne <fabien.dessenne@foss.st.com>
Cc: Lionel Debieve <lionel.debieve@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Link: https://lore.kernel.org/r/20250601193441.6913-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/arm/configs/multi_v7_defconfig
drivers/crypto/stm32/Kconfig
drivers/crypto/stm32/Makefile
drivers/crypto/stm32/stm32-crc32.c [deleted file]