mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01: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. [[email protected]: register avx512 after avx2] Link: https://lore.kernel.org/[email protected] Link: https://lore.kernel.org/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Tested-by: Ard Biesheuvel <[email protected]> # kunit only on arm64 Cc: Albert Ou <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Alexandre Ghiti <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: "Borislav Petkov (AMD)" <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chris Mason <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Dan Williams <[email protected]> Cc: David Sterba <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Herbert Xu <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Li Nan <[email protected]> Cc: Madhavan Srinivasan <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Song Liu <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: WANG Xuerui <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
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.
|