| 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | config XOR_BLOCKS |
| 4 | tristate |
| 5 | |
| 6 | # selected by architectures that provide an optimized XOR implementation |
| 7 | config XOR_BLOCKS_ARCH |
| 8 | depends on XOR_BLOCKS |
| 9 | default y if ALPHA |
| 10 | default y if ARM |
| 11 | default y if ARM64 |
| 12 | default y if CPU_HAS_LSX # loongarch |
| 13 | default y if ALTIVEC # powerpc |
| 14 | default y if RISCV_ISA_V |
| 15 | default y if SPARC |
| 16 | default y if S390 |
| 17 | default y if X86_32 |
| 18 | default y if X86_64 |
| 19 | bool |
| 20 | |
| 21 | config XOR_KUNIT_TEST |
| 22 | tristate "KUnit tests for xor_gen" if !KUNIT_ALL_TESTS |
| 23 | depends on KUNIT |
| 24 | depends on XOR_BLOCKS |
| 25 | default KUNIT_ALL_TESTS |
| 26 | help |
| 27 | Unit tests for the XOR library functions. |
| 28 | |
| 29 | This is intended to help people writing architecture-specific |
| 30 | optimized versions. If unsure, say N. |
| 31 | |
| 32 | config XOR_BENCHMARK |
| 33 | bool "Benchmark for xor_gen" |
| 34 | depends on XOR_KUNIT_TEST |
| 35 | help |
| 36 | Include benchmarks in the KUnit test suite for xor_gen. |
| 37 | |
| 38 | config RAID6_PQ |
| 39 | tristate |
| 40 | |
| 41 | # selected by architectures that provide an optimized PQ implementation |
| 42 | config RAID6_PQ_ARCH |
| 43 | depends on RAID6_PQ |
| 44 | default y if KERNEL_MODE_NEON # arm32/arm64 |
| 45 | default y if LOONGARCH |
| 46 | default y if ALTIVEC # powerpc |
| 47 | default y if RISCV_ISA_V |
| 48 | default y if S390 |
| 49 | default y if X86 |
| 50 | bool |
| 51 | |
| 52 | config RAID6_PQ_KUNIT_TEST |
| 53 | tristate "KUnit tests for RAID6 PQ functions" if !KUNIT_ALL_TESTS |
| 54 | depends on KUNIT |
| 55 | depends on RAID6_PQ |
| 56 | default KUNIT_ALL_TESTS |
| 57 | help |
| 58 | Unit tests for the RAID6 PQ library functions. |
| 59 | |
| 60 | This is intended to help people writing architecture-specific |
| 61 | optimized versions. If unsure, say N. |
| 62 | |
| 63 | config RAID6_PQ_KUNIT_BENCHMARK |
| 64 | bool "Benchmark for RAID6 PQ" |
| 65 | depends on RAID6_PQ_KUNIT_TEST |
| 66 | help |
| 67 | Include benchmarks in the KUnit test suite for raid P/Q generation. |
| 68 | |
| 69 | config RAID6_PQ_BENCHMARK |
| 70 | bool "Automatically choose fastest RAID6 PQ functions" |
| 71 | depends on RAID6_PQ |
| 72 | default y |
| 73 | help |
| 74 | Benchmark all available RAID6 PQ functions on init and choose the |
| 75 | fastest one. |