Kconfig 3.0 KB

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