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
86 config ARCH_USE_SYM_ANNOTATIONS
90 bool "Access I/O in non-MMIO mode"
93 On some platforms where no separate I/O space exists, there are I/O
94 hosts which can not be accessed in MMIO mode. Using the logical PIO
95 mechanism, the host-local I/O resource can be mapped into system
96 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
97 system can access the I/O devices with the mapped-logic PIO through
100 This way has relatively little I/O performance cost. Please make
101 sure your devices really need this configure item enabled.
103 When in doubt, say N.
106 tristate "CRC-CCITT functions"
108 This option is provided for the case where no in-kernel-tree
109 modules require CRC-CCITT functions, but a module built outside
110 the kernel tree does. Such modules that use library CRC-CCITT
111 functions require M here.
114 tristate "CRC16 functions"
116 This option is provided for the case where no in-kernel-tree
117 modules require CRC16 functions, but a module built outside
118 the kernel tree does. Such modules that use library CRC16
119 functions require M here.
122 tristate "CRC calculation for the T10 Data Integrity Field"
124 select CRYPTO_CRCT10DIF
126 This option is only needed if a module that's not in the
127 kernel tree needs to calculate CRC checks for use with the
128 SCSI data integrity subsystem.
131 tristate "CRC ITU-T V.41 functions"
133 This option is provided for the case where no in-kernel-tree
134 modules require CRC ITU-T V.41 functions, but a module built outside
135 the kernel tree does. Such modules that use library CRC ITU-T V.41
136 functions require M here.
139 tristate "CRC32/CRC32c functions"
143 This option is provided for the case where no in-kernel-tree
144 modules require CRC32/CRC32c functions, but a module built outside
145 the kernel tree does. Such modules that use library CRC32/CRC32c
146 functions require M here.
148 config CRC32_SELFTEST
149 tristate "CRC32 perform self test on init"
152 This option enables the CRC32 library functions to perform a
153 self test on initialization. The self test computes crc32_le
154 and crc32_be over byte strings with random alignment and length
155 and computes the total elapsed time and number of bytes processed.
158 prompt "CRC32 implementation"
160 default CRC32_SLICEBY8
162 This option allows a kernel builder to override the default choice
163 of CRC32 algorithm. Choose the default ("slice by 8") unless you
164 know that you need one of the others.
166 config CRC32_SLICEBY8
167 bool "Slice by 8 bytes"
169 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
170 This is the fastest algorithm, but comes with a 8KiB lookup table.
171 Most modern processors have enough cache to hold this table without
174 This is the default implementation choice. Choose this one unless
175 you have a good reason not to.
177 config CRC32_SLICEBY4
178 bool "Slice by 4 bytes"
180 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
181 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
184 Only choose this option if you know what you are doing.
187 bool "Sarwate's Algorithm (one byte at a time)"
189 Calculate checksum a byte at a time using Sarwate's algorithm. This
190 is not particularly fast, but has a small 256 byte lookup table.
192 Only choose this option if you know what you are doing.
195 bool "Classic Algorithm (one bit at a time)"
197 Calculate checksum one bit at a time. This is VERY slow, but has
198 no lookup table. This is provided as a debugging option.
200 Only choose this option if you are debugging crc32.
205 tristate "CRC64 functions"
207 This option is provided for the case where no in-kernel-tree
208 modules require CRC64 functions, but a module built outside
209 the kernel tree does. Such modules that use library CRC64
210 functions require M here.
213 tristate "CRC4 functions"
215 This option is provided for the case where no in-kernel-tree
216 modules require CRC4 functions, but a module built outside
217 the kernel tree does. Such modules that use library CRC4
218 functions require M here.
221 tristate "CRC7 functions"
223 This option is provided for the case where no in-kernel-tree
224 modules require CRC7 functions, but a module built outside
225 the kernel tree does. Such modules that use library CRC7
226 functions require M here.
229 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
233 This option is provided for the case where no in-kernel-tree
234 modules require CRC32c functions, but a module built outside the
235 kernel tree does. Such modules that use library CRC32c functions
236 require M here. See Castagnoli93.
237 Module will be libcrc32c.
240 tristate "CRC8 function"
242 This option provides CRC8 function. Drivers may select this
243 when they need to do cyclic redundancy check according CRC8
244 algorithm. Module will be called crc8.
251 depends on AUDIT && !AUDIT_ARCH
254 config AUDIT_ARCH_COMPAT_GENERIC
258 config AUDIT_COMPAT_GENERIC
260 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
263 config RANDOM32_SELFTEST
264 bool "PRNG perform self test on init"
266 This option enables the 32 bit PRNG library functions to perform a
267 self test on initialization.
270 # compression support is select'ed if needed
276 config 842_DECOMPRESS
290 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
292 Enable s390x hardware support for zlib in the kernel.
297 config LZO_DECOMPRESS
303 config LZ4HC_COMPRESS
306 config LZ4_DECOMPRESS
313 config ZSTD_DECOMPRESS
317 source "lib/xz/Kconfig"
320 # These all provide a common interface (hence the apparent duplication with
321 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
323 config DECOMPRESS_GZIP
327 config DECOMPRESS_BZIP2
330 config DECOMPRESS_LZMA
337 config DECOMPRESS_LZO
338 select LZO_DECOMPRESS
341 config DECOMPRESS_LZ4
342 select LZ4_DECOMPRESS
346 # Generic allocator support is selected if needed
348 config GENERIC_ALLOCATOR
352 # reed solomon support is select'ed if needed
357 config REED_SOLOMON_ENC8
360 config REED_SOLOMON_DEC8
363 config REED_SOLOMON_ENC16
366 config REED_SOLOMON_DEC16
370 # BCH support is selected if needed
375 config BCH_CONST_PARAMS
378 Drivers may select this option to force specific constant
379 values for parameters 'm' (Galois field order) and 't'
380 (error correction capability). Those specific values must
381 be set by declaring default values for symbols BCH_CONST_M
383 Doing so will enable extra compiler optimizations,
384 improving encoding and decoding performance up to 2x for
385 usual (m,t) values (typically such that m*t < 200).
386 When this option is selected, the BCH library supports
387 only a single (m,t) configuration. This is mainly useful
388 for NAND flash board drivers requiring known, fixed BCH
395 Constant value for Galois field order 'm'. If 'k' is the
396 number of data bits to protect, 'm' should be chosen such
397 that (k + m*t) <= 2**m - 1.
398 Drivers should declare a default value for this symbol if
399 they select option BCH_CONST_PARAMS.
404 Constant value for error correction capability in bits 't'.
405 Drivers should declare a default value for this symbol if
406 they select option BCH_CONST_PARAMS.
409 # Textsearch support is select'ed if needed
414 config TEXTSEARCH_KMP
420 config TEXTSEARCH_FSM
429 Simple, embeddable, interval-tree. Can find the start of an
430 overlapping range in log(n) time and then iterate over all
431 overlapping nodes. The algorithm is implemented as an
436 Documentation/core-api/rbtree.rst
438 for more information.
443 Support entries which occupy multiple consecutive indices in the
446 config ASSOCIATIVE_ARRAY
449 Generic associative array. Can be searched and iterated over whilst
450 it is being modified. It is also reasonably quick to search and
451 modify. The algorithms are non-recursive, and the trees are highly
456 Documentation/core-api/assoc_array.rst
458 for more information.
465 config HAS_IOPORT_MAP
467 depends on HAS_IOMEM && !NO_IOPORT_MAP
470 source "kernel/dma/Kconfig"
479 config CHECK_SIGNATURE
482 config CPUMASK_OFFSTACK
483 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
485 Use dynamic allocation for cpumask_var_t, instead of putting
486 them on the stack. This is a bit more expensive, but avoids
498 # This actually supports modular compilation, but the module overhead
499 # is ridiculous for the amount of code involved. Until an out-of-tree
500 # driver asks for it, we'll just link it directly it into the kernel
501 # when required. Since we're ignoring out-of-tree users, there's also
502 # no need bother prompting for a manual decision:
503 # prompt "glob_match() function"
505 This option provides a glob_match function for performing
506 simple text pattern matching. It originated in the ATA code
507 to blacklist particular drive models, but other device drivers
508 may need similar functionality.
510 All drivers in the Linux kernel tree that require this function
511 should automatically select this option. Say N unless you
512 are compiling an out-of tree driver which tells you that it
516 tristate "glob self-test on init"
519 This option enables a simple self-test of the glob_match
520 function on startup. It is primarily useful for people
521 working on the code to ensure they haven't introduced any
524 It only adds a little bit of code and slows kernel boot (or
525 module load) by a small amount, so you're welcome to play with
526 it, but you probably don't need it.
529 # Netlink attribute parsing support is select'ed if needed
535 # Generic 64-bit atomic support is selected if needed
537 config GENERIC_ATOMIC64
547 bool "IRQ polling library"
549 Helper library to poll interrupt mitigation using polling.
555 Multiprecision maths library from GnuPG.
556 It is used to implement RSA digital signature verification,
557 which is used by IMA/EVM digital signature extension.
566 Digital signature verification. Currently only RSA is supported.
567 Implementation is done using GnuPG MPI library
572 Dynamic Interrupt Moderation library.
573 Implements an algorithm for dynamically changing CQ moderation values
574 according to run time performance.
577 # libfdt files, only selected if needed.
585 Enable fast lookup object identifier registry.
593 source "lib/vdso/Kconfig"
595 source "lib/fonts/Kconfig"
600 Provides a helper to split scatterlists into chunks, each chunk being
601 a scatterlist. This should be selected by a driver or an API which
602 whishes to split a scatterlist amongst multiple DMA channels.
607 Provides a helper to allocate chained scatterlists. This should be
608 selected by a driver or an API which whishes to allocate chained
615 config ARCH_NO_SG_CHAIN
618 config ARCH_HAS_PMEM_API
624 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
627 # use memcpy to implement user copies for nommu architectures
628 config UACCESS_MEMCPY
631 config ARCH_HAS_UACCESS_FLUSHCACHE
634 config ARCH_HAS_UACCESS_MCSAFE
637 # Temporary. Goes away when all archs are cleaned up
638 config ARCH_STACKWALK
649 tristate "parman" if COMPILE_TEST
652 tristate "objagg" if COMPILE_TEST
654 config STRING_SELFTEST
655 tristate "Test string functions"
659 config GENERIC_IOREMAP
662 config GENERIC_LIB_ASHLDI3
665 config GENERIC_LIB_ASHRDI3
668 config GENERIC_LIB_LSHRDI3
671 config GENERIC_LIB_MULDI3
674 config GENERIC_LIB_CMPDI2
677 config GENERIC_LIB_UCMPDI2