lib/crc: riscv: Migrate optimized CRC code into lib/crc/
authorEric Biggers <ebiggers@kernel.org>
Sat, 7 Jun 2025 20:04:50 +0000 (13:04 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:31:57 +0000 (09:31 -0700)
commitb5943815e63b859b5b66710e79c9561112c4d01b
treebc5187a1dbf27e49c416c2a433bcc0675f943465
parent190c253d8696b7ba14424c484435ac2d4bcb9ebd
lib/crc: riscv: Migrate optimized CRC code into lib/crc/

Move the riscv-optimized CRC code from arch/riscv/lib/crc* into its new
location in lib/crc/riscv/, and wire it up in the new way.  This new way
of organizing the CRC code eliminates the need to artificially split the
code for each CRC variant into separate arch and generic modules,
enabling better inlining and dead code elimination.  For more details,
see "lib/crc: Prepare for arch-optimized code in subdirs of lib/crc/".

Reviewed-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: "Jason A. Donenfeld" <Jason@zx2c4.com>
Link: https://lore.kernel.org/r/20250607200454.73587-9-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
26 files changed:
arch/riscv/Kconfig
arch/riscv/lib/Makefile
arch/riscv/lib/crc-clmul-consts.h [deleted file]
arch/riscv/lib/crc-clmul-template.h [deleted file]
arch/riscv/lib/crc-clmul.h [deleted file]
arch/riscv/lib/crc-t10dif.c [deleted file]
arch/riscv/lib/crc16_msb.c [deleted file]
arch/riscv/lib/crc32.c [deleted file]
arch/riscv/lib/crc32_lsb.c [deleted file]
arch/riscv/lib/crc32_msb.c [deleted file]
arch/riscv/lib/crc64.c [deleted file]
arch/riscv/lib/crc64_lsb.c [deleted file]
arch/riscv/lib/crc64_msb.c [deleted file]
lib/crc/Kconfig
lib/crc/Makefile
lib/crc/riscv/crc-clmul-consts.h [new file with mode: 0644]
lib/crc/riscv/crc-clmul-template.h [new file with mode: 0644]
lib/crc/riscv/crc-clmul.h [new file with mode: 0644]
lib/crc/riscv/crc-t10dif.h [new file with mode: 0644]
lib/crc/riscv/crc16_msb.c [new file with mode: 0644]
lib/crc/riscv/crc32.h [new file with mode: 0644]
lib/crc/riscv/crc32_lsb.c [new file with mode: 0644]
lib/crc/riscv/crc32_msb.c [new file with mode: 0644]
lib/crc/riscv/crc64.h [new file with mode: 0644]
lib/crc/riscv/crc64_lsb.c [new file with mode: 0644]
lib/crc/riscv/crc64_msb.c [new file with mode: 0644]