diff options
author | Eric Biggers <ebiggers@google.com> | 2025-05-10 06:59:59 +0300 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2025-05-10 07:02:37 +0300 |
commit | 648c7fb16f609c53d2659fefb5088af619485ab4 (patch) | |
tree | ca35137c423b2acb6411152c86fc69cd46f21e18 /arch/sparc | |
parent | 46e3311607d6c18a760fba4afbd5d24d42abb0f3 (diff) | |
download | linux-648c7fb16f609c53d2659fefb5088af619485ab4.tar.xz |
lib/crc: make arch-optimized code use subsys_initcall
Make the architecture-optimized CRC code do its CPU feature checks in
subsys_initcalls instead of arch_initcalls. This makes it consistent
with arch/*/lib/crypto/ and ensures that it runs after initcalls that
possibly could be a prerequisite for kernel-mode FPU, such as x86's
xfd_update_static_branch() and loongarch's init_euen_mask().
Note: as far as I can tell, x86's xfd_update_static_branch() isn't
*actually* needed for kernel-mode FPU. loongarch's init_euen_mask() is
needed to enable save/restore of the vector registers, but loongarch
doesn't yet have any CRC or crypto code that uses vector registers
anyway. Regardless, let's be consistent with arch/*/lib/crypto/ and
robust against any potential future dependency on an arch_initcall.
Link: https://lore.kernel.org/r/20250510035959.87995-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/lib/crc32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/lib/crc32.c b/arch/sparc/lib/crc32.c index 428fd5588e93..40d4720a42a1 100644 --- a/arch/sparc/lib/crc32.c +++ b/arch/sparc/lib/crc32.c @@ -74,7 +74,7 @@ static int __init crc32_sparc_init(void) pr_info("Using sparc64 crc32c opcode optimized CRC32C implementation\n"); return 0; } -arch_initcall(crc32_sparc_init); +subsys_initcall(crc32_sparc_init); static void __exit crc32_sparc_exit(void) { |