]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/crc64: add support for arch-optimized implementations
authorEric Biggers <ebiggers@google.com>
Thu, 30 Jan 2025 03:51:24 +0000 (19:51 -0800)
committerEric Biggers <ebiggers@google.com>
Sun, 9 Feb 2025 04:06:28 +0000 (20:06 -0800)
commit067bc8717aeee415d6a6294e63b70821846c45c3
tree2a1f7676444d93fba2ebad6b090f5ddf5cf769d4
parent23709bd3c4c5b412946d2fddf2b50a0d4c8f353a
lib/crc64: add support for arch-optimized implementations

Add support for architecture-optimized implementations of the CRC64
library functions, following the approach taken for the CRC32 and
CRC-T10DIF library functions.

Also take the opportunity to tweak the function prototypes:
- Use 'const void *' for the lib entry points (since this is easier for
  users) but 'const u8 *' for the underlying arch and generic functions
  (since this is easier for the implementations of these functions).
- Don't bother with __pure.  It's an unusual optimization that doesn't
  help properly written code.  It's a weird quirk we can do without.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Acked-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20250130035130.180676-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
include/linux/crc64.h
lib/Kconfig
lib/crc64.c