mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 13:57:33 -04:00
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>
64 lines
1.5 KiB
Plaintext
64 lines
1.5 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
config XOR_BLOCKS
|
|
tristate
|
|
|
|
# selected by architectures that provide an optimized XOR implementation
|
|
config XOR_BLOCKS_ARCH
|
|
depends on XOR_BLOCKS
|
|
default y if ALPHA
|
|
default y if ARM
|
|
default y if ARM64
|
|
default y if CPU_HAS_LSX # loongarch
|
|
default y if ALTIVEC # powerpc
|
|
default y if RISCV_ISA_V
|
|
default y if SPARC
|
|
default y if S390
|
|
default y if X86_32
|
|
default y if X86_64
|
|
bool
|
|
|
|
config XOR_KUNIT_TEST
|
|
tristate "KUnit tests for xor_gen" if !KUNIT_ALL_TESTS
|
|
depends on KUNIT
|
|
depends on XOR_BLOCKS
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
Unit tests for the XOR library functions.
|
|
|
|
This is intended to help people writing architecture-specific
|
|
optimized versions. If unsure, say N.
|
|
|
|
config RAID6_PQ
|
|
tristate
|
|
|
|
# selected by architectures that provide an optimized PQ implementation
|
|
config RAID6_PQ_ARCH
|
|
depends on RAID6_PQ
|
|
default y if KERNEL_MODE_NEON # arm32/arm64
|
|
default y if LOONGARCH
|
|
default y if ALTIVEC # powerpc
|
|
default y if RISCV_ISA_V
|
|
default y if S390
|
|
default y if X86
|
|
bool
|
|
|
|
config RAID6_PQ_KUNIT_TEST
|
|
tristate "KUnit tests for RAID6 PQ functions" if !KUNIT_ALL_TESTS
|
|
depends on KUNIT
|
|
depends on RAID6_PQ
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
Unit tests for the RAID6 PQ library functions.
|
|
|
|
This is intended to help people writing architecture-specific
|
|
optimized versions. If unsure, say N.
|
|
|
|
config RAID6_PQ_BENCHMARK
|
|
bool "Automatically choose fastest RAID6 PQ functions"
|
|
depends on RAID6_PQ
|
|
default y
|
|
help
|
|
Benchmark all available RAID6 PQ functions on init and choose the
|
|
fastest one.
|