1 # SPDX-License-Identifier: GPL-2.0-only
3 # Library configuration
9 menu "Library routines"
14 config RAID6_PQ_BENCHMARK
15 bool "Automatically choose fastest RAID6 PQ functions"
19 Benchmark all available RAID6 PQ functions on init and choose the
26 bool "Generic bitfield packing and unpacking"
29 This option provides the packing() helper function, which permits
30 converting bitfields between a CPU-usable representation and a
31 memory representation that can have any combination of these quirks:
32 - Is little endian (bytes are reversed within a 32-bit group)
33 - The least-significant 32-bit word comes first (within a 64-bit
35 - The most significant bit of a byte is at its right (bit 0 of a
36 register description is numerically 2^7).
37 Drivers may use these helpers to match the bit indices as described
38 in the data sheets of the peripherals they are in control of.
45 config HAVE_ARCH_BITREVERSE
50 This option enables the use of hardware bit-reversal instructions on
51 architectures which support such operations.
53 config GENERIC_STRNCPY_FROM_USER
56 config GENERIC_STRNLEN_USER
59 config GENERIC_NET_UTILS
62 config GENERIC_FIND_FIRST_BIT
65 source "lib/math/Kconfig"
67 config NO_GENERIC_PCI_IOPORT_MAP
70 config GENERIC_PCI_IOMAP
75 select GENERIC_PCI_IOMAP
80 config ARCH_USE_CMPXCHG_LOCKREF
83 config ARCH_HAS_FAST_MULTIPLIER
87 bool "Access I/O in non-MMIO mode"
90 On some platforms where no separate I/O space exists, there are I/O
91 hosts which can not be accessed in MMIO mode. Using the logical PIO
92 mechanism, the host-local I/O resource can be mapped into system
93 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
94 system can access the I/O devices with the mapped-logic PIO through
97 This way has relatively little I/O performance cost. Please make
98 sure your devices really need this configure item enabled.
100 When in doubt, say N.
103 tristate "CRC-CCITT functions"
105 This option is provided for the case where no in-kernel-tree
106 modules require CRC-CCITT functions, but a module built outside
107 the kernel tree does. Such modules that use library CRC-CCITT
108 functions require M here.
111 tristate "CRC16 functions"
113 This option is provided for the case where no in-kernel-tree
114 modules require CRC16 functions, but a module built outside
115 the kernel tree does. Such modules that use library CRC16
116 functions require M here.
119 tristate "CRC calculation for the T10 Data Integrity Field"
121 select CRYPTO_CRCT10DIF
123 This option is only needed if a module that's not in the
124 kernel tree needs to calculate CRC checks for use with the
125 SCSI data integrity subsystem.
128 tristate "CRC ITU-T V.41 functions"
130 This option is provided for the case where no in-kernel-tree
131 modules require CRC ITU-T V.41 functions, but a module built outside
132 the kernel tree does. Such modules that use library CRC ITU-T V.41
133 functions require M here.
136 tristate "CRC32/CRC32c functions"
140 This option is provided for the case where no in-kernel-tree
141 modules require CRC32/CRC32c functions, but a module built outside
142 the kernel tree does. Such modules that use library CRC32/CRC32c
143 functions require M here.
145 config CRC32_SELFTEST
146 tristate "CRC32 perform self test on init"
149 This option enables the CRC32 library functions to perform a
150 self test on initialization. The self test computes crc32_le
151 and crc32_be over byte strings with random alignment and length
152 and computes the total elapsed time and number of bytes processed.
155 prompt "CRC32 implementation"
157 default CRC32_SLICEBY8
159 This option allows a kernel builder to override the default choice
160 of CRC32 algorithm. Choose the default ("slice by 8") unless you
161 know that you need one of the others.
163 config CRC32_SLICEBY8
164 bool "Slice by 8 bytes"
166 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
167 This is the fastest algorithm, but comes with a 8KiB lookup table.
168 Most modern processors have enough cache to hold this table without
171 This is the default implementation choice. Choose this one unless
172 you have a good reason not to.
174 config CRC32_SLICEBY4
175 bool "Slice by 4 bytes"
177 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
178 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
181 Only choose this option if you know what you are doing.
184 bool "Sarwate's Algorithm (one byte at a time)"
186 Calculate checksum a byte at a time using Sarwate's algorithm. This
187 is not particularly fast, but has a small 256 byte lookup table.
189 Only choose this option if you know what you are doing.
192 bool "Classic Algorithm (one bit at a time)"
194 Calculate checksum one bit at a time. This is VERY slow, but has
195 no lookup table. This is provided as a debugging option.
197 Only choose this option if you are debugging crc32.
202 tristate "CRC64 functions"
204 This option is provided for the case where no in-kernel-tree
205 modules require CRC64 functions, but a module built outside
206 the kernel tree does. Such modules that use library CRC64
207 functions require M here.
210 tristate "CRC4 functions"
212 This option is provided for the case where no in-kernel-tree
213 modules require CRC4 functions, but a module built outside
214 the kernel tree does. Such modules that use library CRC4
215 functions require M here.
218 tristate "CRC7 functions"
220 This option is provided for the case where no in-kernel-tree
221 modules require CRC7 functions, but a module built outside
222 the kernel tree does. Such modules that use library CRC7
223 functions require M here.
226 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
230 This option is provided for the case where no in-kernel-tree
231 modules require CRC32c functions, but a module built outside the
232 kernel tree does. Such modules that use library CRC32c functions
233 require M here. See Castagnoli93.
234 Module will be libcrc32c.
237 tristate "CRC8 function"
239 This option provides CRC8 function. Drivers may select this
240 when they need to do cyclic redundancy check according CRC8
241 algorithm. Module will be called crc8.
248 depends on AUDIT && !AUDIT_ARCH
251 config AUDIT_ARCH_COMPAT_GENERIC
255 config AUDIT_COMPAT_GENERIC
257 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
260 config RANDOM32_SELFTEST
261 bool "PRNG perform self test on init"
263 This option enables the 32 bit PRNG library functions to perform a
264 self test on initialization.
267 # compression support is select'ed if needed
273 config 842_DECOMPRESS
287 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
289 Enable s390x hardware support for zlib in the kernel.
294 config LZO_DECOMPRESS
300 config LZ4HC_COMPRESS
303 config LZ4_DECOMPRESS
310 config ZSTD_DECOMPRESS
314 source "lib/xz/Kconfig"
317 # These all provide a common interface (hence the apparent duplication with
318 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
320 config DECOMPRESS_GZIP
324 config DECOMPRESS_BZIP2
327 config DECOMPRESS_LZMA
334 config DECOMPRESS_LZO
335 select LZO_DECOMPRESS
338 config DECOMPRESS_LZ4
339 select LZ4_DECOMPRESS
343 # Generic allocator support is selected if needed
345 config GENERIC_ALLOCATOR
349 # reed solomon support is select'ed if needed
354 config REED_SOLOMON_ENC8
357 config REED_SOLOMON_DEC8
360 config REED_SOLOMON_ENC16
363 config REED_SOLOMON_DEC16
367 # BCH support is selected if needed
372 config BCH_CONST_PARAMS
375 Drivers may select this option to force specific constant
376 values for parameters 'm' (Galois field order) and 't'
377 (error correction capability). Those specific values must
378 be set by declaring default values for symbols BCH_CONST_M
380 Doing so will enable extra compiler optimizations,
381 improving encoding and decoding performance up to 2x for
382 usual (m,t) values (typically such that m*t < 200).
383 When this option is selected, the BCH library supports
384 only a single (m,t) configuration. This is mainly useful
385 for NAND flash board drivers requiring known, fixed BCH
392 Constant value for Galois field order 'm'. If 'k' is the
393 number of data bits to protect, 'm' should be chosen such
394 that (k + m*t) <= 2**m - 1.
395 Drivers should declare a default value for this symbol if
396 they select option BCH_CONST_PARAMS.
401 Constant value for error correction capability in bits 't'.
402 Drivers should declare a default value for this symbol if
403 they select option BCH_CONST_PARAMS.
406 # Textsearch support is select'ed if needed
411 config TEXTSEARCH_KMP
417 config TEXTSEARCH_FSM
426 Simple, embeddable, interval-tree. Can find the start of an
427 overlapping range in log(n) time and then iterate over all
428 overlapping nodes. The algorithm is implemented as an
433 Documentation/rbtree.txt
435 for more information.
440 Support entries which occupy multiple consecutive indices in the
443 config ASSOCIATIVE_ARRAY
446 Generic associative array. Can be searched and iterated over whilst
447 it is being modified. It is also reasonably quick to search and
448 modify. The algorithms are non-recursive, and the trees are highly
453 Documentation/core-api/assoc_array.rst
455 for more information.
462 config HAS_IOPORT_MAP
464 depends on HAS_IOMEM && !NO_IOPORT_MAP
467 source "kernel/dma/Kconfig"
476 config CHECK_SIGNATURE
479 config CPUMASK_OFFSTACK
480 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
482 Use dynamic allocation for cpumask_var_t, instead of putting
483 them on the stack. This is a bit more expensive, but avoids
495 # This actually supports modular compilation, but the module overhead
496 # is ridiculous for the amount of code involved. Until an out-of-tree
497 # driver asks for it, we'll just link it directly it into the kernel
498 # when required. Since we're ignoring out-of-tree users, there's also
499 # no need bother prompting for a manual decision:
500 # prompt "glob_match() function"
502 This option provides a glob_match function for performing
503 simple text pattern matching. It originated in the ATA code
504 to blacklist particular drive models, but other device drivers
505 may need similar functionality.
507 All drivers in the Linux kernel tree that require this function
508 should automatically select this option. Say N unless you
509 are compiling an out-of tree driver which tells you that it
513 tristate "glob self-test on init"
516 This option enables a simple self-test of the glob_match
517 function on startup. It is primarily useful for people
518 working on the code to ensure they haven't introduced any
521 It only adds a little bit of code and slows kernel boot (or
522 module load) by a small amount, so you're welcome to play with
523 it, but you probably don't need it.
526 # Netlink attribute parsing support is select'ed if needed
532 # Generic 64-bit atomic support is selected if needed
534 config GENERIC_ATOMIC64
544 bool "IRQ polling library"
546 Helper library to poll interrupt mitigation using polling.
552 Multiprecision maths library from GnuPG.
553 It is used to implement RSA digital signature verification,
554 which is used by IMA/EVM digital signature extension.
563 Digital signature verification. Currently only RSA is supported.
564 Implementation is done using GnuPG MPI library
569 Dynamic Interrupt Moderation library.
570 Implements an algorithm for dynamically changing CQ moderation values
571 according to run time performance.
574 # libfdt files, only selected if needed.
582 Enable fast lookup object identifier registry.
590 source "lib/vdso/Kconfig"
592 source "lib/fonts/Kconfig"
597 Provides a helper to split scatterlists into chunks, each chunk being
598 a scatterlist. This should be selected by a driver or an API which
599 whishes to split a scatterlist amongst multiple DMA channels.
604 Provides a helper to allocate chained scatterlists. This should be
605 selected by a driver or an API which whishes to allocate chained
612 config ARCH_NO_SG_CHAIN
615 config ARCH_HAS_PMEM_API
621 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
624 # use memcpy to implement user copies for nommu architectures
625 config UACCESS_MEMCPY
628 config ARCH_HAS_UACCESS_FLUSHCACHE
631 config ARCH_HAS_UACCESS_MCSAFE
634 # Temporary. Goes away when all archs are cleaned up
635 config ARCH_STACKWALK
646 tristate "parman" if COMPILE_TEST
649 tristate "objagg" if COMPILE_TEST
651 config STRING_SELFTEST
652 tristate "Test string functions"
656 config GENERIC_IOREMAP
659 config GENERIC_LIB_ASHLDI3
662 config GENERIC_LIB_ASHRDI3
665 config GENERIC_LIB_LSHRDI3
668 config GENERIC_LIB_MULDI3
671 config GENERIC_LIB_CMPDI2
674 config GENERIC_LIB_UCMPDI2