Commit 15d90a5e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull CRC updates from Eric Biggers:
 "Cleanups for the kernel's CRC (cyclic redundancy check) code:

   - Use __ro_after_init where appropriate

   - Remove unnecessary static_key on s390

   - Rename some source code files

   - Rename the crc32 and crc32c crypto API modules

   - Use subsys_initcall instead of arch_initcall

   - Restore maintainers for crc_kunit.c

   - Fold crc16_byte() into crc16.c

   - Add some SPDX license identifiers"

* tag 'crc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  lib/crc32: add SPDX license identifier
  lib/crc16: unexport crc16_table and crc16_byte()
  w1: ds2406: use crc16() instead of crc16_byte() loop
  MAINTAINERS: add crc_kunit.c back to CRC LIBRARY
  lib/crc: make arch-optimized code use subsys_initcall
  crypto: crc32 - remove "generic" from file and module names
  x86/crc: drop "glue" from filenames
  sparc/crc: drop "glue" from filenames
  s390/crc: drop "glue" from filenames
  powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S
  powerpc/crc: drop "glue" from filenames
  arm64/crc: drop "glue" from filenames
  arm/crc: drop "glue" from filenames
  s390/crc32: Remove no-op module init and exit functions
  s390/crc32: Remove have_vxrs static key
  lib/crc: make the CPU feature static keys __ro_after_init
parents 14f19dc6 289c99be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6263,6 +6263,7 @@ F: Documentation/staging/crc*
F:	arch/*/lib/crc*
F:	include/linux/crc*
F:	lib/crc*
F:	lib/tests/crc_kunit.c
F:	scripts/gen-crc-consts.py
CREATIVE SB0540
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ endif
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o

obj-$(CONFIG_CRC32_ARCH) += crc32-arm.o
crc32-arm-y := crc32-glue.o crc32-core.o
crc32-arm-y := crc32.o crc32-core.o

obj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-arm.o
crc-t10dif-arm-y := crc-t10dif-glue.o crc-t10dif-core.o
crc-t10dif-arm-y := crc-t10dif.o crc-t10dif-core.o
+3 −3
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@
#include <asm/neon.h>
#include <asm/simd.h>

static DEFINE_STATIC_KEY_FALSE(have_neon);
static DEFINE_STATIC_KEY_FALSE(have_pmull);
static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_neon);
static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_pmull);

#define CRC_T10DIF_PMULL_CHUNK_SIZE	16U

@@ -60,7 +60,7 @@ static int __init crc_t10dif_arm_init(void)
	}
	return 0;
}
arch_initcall(crc_t10dif_arm_init);
subsys_initcall(crc_t10dif_arm_init);

static void __exit crc_t10dif_arm_exit(void)
{
+3 −3
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@
#include <asm/neon.h>
#include <asm/simd.h>

static DEFINE_STATIC_KEY_FALSE(have_crc32);
static DEFINE_STATIC_KEY_FALSE(have_pmull);
static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_crc32);
static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_pmull);

#define PMULL_MIN_LEN	64	/* min size of buffer for pmull functions */

@@ -103,7 +103,7 @@ static int __init crc32_arm_init(void)
		static_branch_enable(&have_pmull);
	return 0;
}
arch_initcall(crc32_arm_init);
subsys_initcall(crc32_arm_init);

static void __exit crc32_arm_exit(void)
{
+2 −2
Original line number Diff line number Diff line
@@ -14,10 +14,10 @@ endif
lib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o

obj-$(CONFIG_CRC32_ARCH) += crc32-arm64.o
crc32-arm64-y := crc32.o crc32-glue.o
crc32-arm64-y := crc32.o crc32-core.o

obj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-arm64.o
crc-t10dif-arm64-y := crc-t10dif-glue.o crc-t10dif-core.o
crc-t10dif-arm64-y := crc-t10dif.o crc-t10dif-core.o

obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o

Loading