| 1 |
# SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
# Kconfig for the kernel's cyclic redundancy check (CRC) library code |
| 4 |
|
| 5 |
config CRC4 |
| 6 |
tristate |
| 7 |
help |
| 8 |
The CRC4 library functions. Select this if your module uses any of |
| 9 |
the functions from <linux/crc4.h>. |
| 10 |
|
| 11 |
config CRC7 |
| 12 |
tristate |
| 13 |
help |
| 14 |
The CRC7 library functions. Select this if your module uses any of |
| 15 |
the functions from <linux/crc7.h>. |
| 16 |
|
| 17 |
config CRC8 |
| 18 |
tristate |
| 19 |
help |
| 20 |
The CRC8 library functions. Select this if your module uses any of |
| 21 |
the functions from <linux/crc8.h>. |
| 22 |
|
| 23 |
config CRC16 |
| 24 |
tristate |
| 25 |
help |
| 26 |
The CRC16 library functions. Select this if your module uses any of |
| 27 |
the functions from <linux/crc16.h>. |
| 28 |
|
| 29 |
config CRC_CCITT |
| 30 |
tristate |
| 31 |
help |
| 32 |
The CRC-CCITT library functions. Select this if your module uses any |
| 33 |
of the functions from <linux/crc-ccitt.h>. |
| 34 |
|
| 35 |
config CRC_ITU_T |
| 36 |
tristate |
| 37 |
help |
| 38 |
The CRC-ITU-T library functions. Select this if your module uses |
| 39 |
any of the functions from <linux/crc-itu-t.h>. |
| 40 |
|
| 41 |
config CRC_T10DIF |
| 42 |
tristate |
| 43 |
help |
| 44 |
The CRC-T10DIF library functions. Select this if your module uses |
| 45 |
any of the functions from <linux/crc-t10dif.h>. |
| 46 |
|
| 47 |
config CRC_T10DIF_ARCH |
| 48 |
bool |
| 49 |
depends on CRC_T10DIF && CRC_OPTIMIZATIONS |
| 50 |
default y if ARM && KERNEL_MODE_NEON |
| 51 |
default y if ARM64 && KERNEL_MODE_NEON |
| 52 |
default y if PPC64 && ALTIVEC |
| 53 |
default y if RISCV && RISCV_ISA_ZBC |
| 54 |
default y if X86 |
| 55 |
|
| 56 |
config CRC32 |
| 57 |
tristate |
| 58 |
select BITREVERSE |
| 59 |
help |
| 60 |
The CRC32 library functions. Select this if your module uses any of |
| 61 |
the functions from <linux/crc32.h> or <linux/crc32c.h>. |
| 62 |
|
| 63 |
config CRC32_ARCH |
| 64 |
bool |
| 65 |
depends on CRC32 && CRC_OPTIMIZATIONS |
| 66 |
default y if ARM && KERNEL_MODE_NEON |
| 67 |
default y if ARM64 |
| 68 |
default y if LOONGARCH |
| 69 |
default y if MIPS && CPU_MIPSR6 |
| 70 |
default y if PPC64 && ALTIVEC |
| 71 |
default y if RISCV && RISCV_ISA_ZBC |
| 72 |
default y if S390 |
| 73 |
default y if SPARC64 |
| 74 |
default y if X86 |
| 75 |
|
| 76 |
config CRC64 |
| 77 |
tristate |
| 78 |
help |
| 79 |
The CRC64 library functions. Select this if your module uses any of |
| 80 |
the functions from <linux/crc64.h>. |
| 81 |
|
| 82 |
config CRC64_ARCH |
| 83 |
bool |
| 84 |
depends on CRC64 && CRC_OPTIMIZATIONS |
| 85 |
default y if RISCV && RISCV_ISA_ZBC && 64BIT |
| 86 |
default y if X86_64 |
| 87 |
|
| 88 |
config CRC_OPTIMIZATIONS |
| 89 |
bool "Enable optimized CRC implementations" if EXPERT |
| 90 |
depends on !UML |
| 91 |
default y |
| 92 |
help |
| 93 |
Disabling this option reduces code size slightly by disabling the |
| 94 |
architecture-optimized implementations of any CRC variants that are |
| 95 |
enabled. CRC checksumming performance may get much slower. |
| 96 |
|
| 97 |
Keep this enabled unless you're really trying to minimize the size of |
| 98 |
the kernel. |
| 99 |
|
| 100 |
config CRC_KUNIT_TEST |
| 101 |
tristate "KUnit tests for CRC functions" if !KUNIT_ALL_TESTS |
| 102 |
depends on KUNIT && (CRC7 || CRC16 || CRC_T10DIF || CRC32 || CRC64) |
| 103 |
default KUNIT_ALL_TESTS |
| 104 |
help |
| 105 |
Unit tests for the CRC library functions. |
| 106 |
|
| 107 |
This is intended to help people writing architecture-specific |
| 108 |
optimized versions. If unsure, say N. |
| 109 |
|
| 110 |
config CRC_BENCHMARK |
| 111 |
bool "Benchmark for the CRC functions" |
| 112 |
depends on CRC_KUNIT_TEST |
| 113 |
help |
| 114 |
Include benchmarks in the KUnit test suite for the CRC functions. |