lib/crc: x86: Migrate optimized CRC code into lib/crc/
authorEric Biggers <ebiggers@kernel.org>
Sat, 7 Jun 2025 20:04:53 +0000 (13:04 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:31:57 +0000 (09:31 -0700)
commitb10749d89f5405d7c0319b86ad92a47ccc5ce00c
tree7eb80eec58c8cf74488abdeb789f2a3193e3acee
parent9b2d720e8ac4b68043ef23820ff9210fa12ea50d
lib/crc: x86: Migrate optimized CRC code into lib/crc/

Move the x86-optimized CRC code from arch/x86/lib/crc* into its new
location in lib/crc/x86/, 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-12-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
24 files changed:
arch/x86/Kconfig
arch/x86/lib/Makefile
arch/x86/lib/crc-pclmul-consts.h [deleted file]
arch/x86/lib/crc-pclmul-template.S [deleted file]
arch/x86/lib/crc-pclmul-template.h [deleted file]
arch/x86/lib/crc-t10dif.c [deleted file]
arch/x86/lib/crc16-msb-pclmul.S [deleted file]
arch/x86/lib/crc32-pclmul.S [deleted file]
arch/x86/lib/crc32.c [deleted file]
arch/x86/lib/crc32c-3way.S [deleted file]
arch/x86/lib/crc64-pclmul.S [deleted file]
arch/x86/lib/crc64.c [deleted file]
lib/crc/Kconfig
lib/crc/Makefile
lib/crc/x86/crc-pclmul-consts.h [new file with mode: 0644]
lib/crc/x86/crc-pclmul-template.S [new file with mode: 0644]
lib/crc/x86/crc-pclmul-template.h [new file with mode: 0644]
lib/crc/x86/crc-t10dif.h [new file with mode: 0644]
lib/crc/x86/crc16-msb-pclmul.S [new file with mode: 0644]
lib/crc/x86/crc32-pclmul.S [new file with mode: 0644]
lib/crc/x86/crc32.h [new file with mode: 0644]
lib/crc/x86/crc32c-3way.S [new file with mode: 0644]
lib/crc/x86/crc64-pclmul.S [new file with mode: 0644]
lib/crc/x86/crc64.h [new file with mode: 0644]