]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
raid6: rework registration of optimized algorithms
authorChristoph Hellwig <hch@lst.de>
Mon, 18 May 2026 05:17:53 +0000 (07:17 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:54 +0000 (21:24 -0700)
commitadfcf6e89bc1322c4a6cc37ad32e411cf0500622
tree3d762a778f9ed4d9ac5e107cef7f98cf804a34bc
parent769d603fc44f896e7f61de7f0cdb8b78d46bc8c8
raid6: rework registration of optimized algorithms

Replace the static array of algorithms with a call to an architecture
helper to register algorithms.  This serves two purposes: it avoid having
to register all algorithms in a single central place, and it removes the
need for the priority field by just registering the algorithms that the
architecture considers suitable for the currently running CPUs.

[hch@lst.de: register avx512 after avx2]
Link: https://lore.kernel.org/20260527074539.2292913-3-hch@lst.de
Link: https://lore.kernel.org/20260518051804.462141-11-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Ard Biesheuvel <ardb@kernel.org> # kunit only on arm64
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Mason <clm@fb.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Sterba <dsterba@suse.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Li Nan <linan122@huawei.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Song Liu <song@kernel.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
31 files changed:
lib/raid/Kconfig
lib/raid/raid6/Makefile
lib/raid/raid6/algos.c
lib/raid/raid6/algos.h
lib/raid/raid6/arm/neon.c
lib/raid/raid6/arm/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/arm/recov_neon.c
lib/raid/raid6/arm64/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/loongarch/loongarch_simd.c
lib/raid/raid6/loongarch/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/loongarch/recov_loongarch_simd.c
lib/raid/raid6/powerpc/altivec.uc
lib/raid/raid6/powerpc/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/powerpc/vpermxor.uc
lib/raid/raid6/recov.c
lib/raid/raid6/riscv/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/riscv/recov_rvv.c
lib/raid/raid6/riscv/rvv.h
lib/raid/raid6/s390/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/s390/recov_s390xc.c
lib/raid/raid6/s390/s390vx.uc
lib/raid/raid6/tests/raid6_kunit.c
lib/raid/raid6/x86/avx2.c
lib/raid/raid6/x86/avx512.c
lib/raid/raid6/x86/mmx.c
lib/raid/raid6/x86/pq_arch.h [new file with mode: 0644]
lib/raid/raid6/x86/recov_avx2.c
lib/raid/raid6/x86/recov_avx512.c
lib/raid/raid6/x86/recov_ssse3.c
lib/raid/raid6/x86/sse1.c
lib/raid/raid6/x86/sse2.c