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
49 This option enables the use of hardware bit-reversal instructions on
50 architectures which support such operations.
52 config GENERIC_STRNCPY_FROM_USER
55 config GENERIC_STRNLEN_USER
58 config GENERIC_NET_UTILS
61 config GENERIC_FIND_FIRST_BIT
64 source "lib/math/Kconfig"
66 config NO_GENERIC_PCI_IOPORT_MAP
69 config GENERIC_PCI_IOMAP
74 select GENERIC_PCI_IOMAP
79 config ARCH_USE_CMPXCHG_LOCKREF
82 config ARCH_HAS_FAST_MULTIPLIER
85 config ARCH_USE_SYM_ANNOTATIONS
89 bool "Access I/O in non-MMIO mode"
92 On some platforms where no separate I/O space exists, there are I/O
93 hosts which can not be accessed in MMIO mode. Using the logical PIO
94 mechanism, the host-local I/O resource can be mapped into system
95 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
96 system can access the I/O devices with the mapped-logic PIO through
99 This way has relatively little I/O performance cost. Please make
100 sure your devices really need this configure item enabled.
102 When in doubt, say N.
104 source "lib/crypto/Kconfig"
110 tristate "CRC-CCITT functions"
112 This option is provided for the case where no in-kernel-tree
113 modules require CRC-CCITT functions, but a module built outside
114 the kernel tree does. Such modules that use library CRC-CCITT
115 functions require M here.
118 tristate "CRC16 functions"
120 This option is provided for the case where no in-kernel-tree
121 modules require CRC16 functions, but a module built outside
122 the kernel tree does. Such modules that use library CRC16
123 functions require M here.
126 tristate "CRC calculation for the T10 Data Integrity Field"
128 select CRYPTO_CRCT10DIF
130 This option is only needed if a module that's not in the
131 kernel tree needs to calculate CRC checks for use with the
132 SCSI data integrity subsystem.
135 tristate "CRC ITU-T V.41 functions"
137 This option is provided for the case where no in-kernel-tree
138 modules require CRC ITU-T V.41 functions, but a module built outside
139 the kernel tree does. Such modules that use library CRC ITU-T V.41
140 functions require M here.
143 tristate "CRC32/CRC32c functions"
147 This option is provided for the case where no in-kernel-tree
148 modules require CRC32/CRC32c functions, but a module built outside
149 the kernel tree does. Such modules that use library CRC32/CRC32c
150 functions require M here.
152 config CRC32_SELFTEST
153 tristate "CRC32 perform self test on init"
156 This option enables the CRC32 library functions to perform a
157 self test on initialization. The self test computes crc32_le
158 and crc32_be over byte strings with random alignment and length
159 and computes the total elapsed time and number of bytes processed.
162 prompt "CRC32 implementation"
164 default CRC32_SLICEBY8
166 This option allows a kernel builder to override the default choice
167 of CRC32 algorithm. Choose the default ("slice by 8") unless you
168 know that you need one of the others.
170 config CRC32_SLICEBY8
171 bool "Slice by 8 bytes"
173 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
174 This is the fastest algorithm, but comes with a 8KiB lookup table.
175 Most modern processors have enough cache to hold this table without
178 This is the default implementation choice. Choose this one unless
179 you have a good reason not to.
181 config CRC32_SLICEBY4
182 bool "Slice by 4 bytes"
184 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
185 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
188 Only choose this option if you know what you are doing.
191 bool "Sarwate's Algorithm (one byte at a time)"
193 Calculate checksum a byte at a time using Sarwate's algorithm. This
194 is not particularly fast, but has a small 256 byte lookup table.
196 Only choose this option if you know what you are doing.
199 bool "Classic Algorithm (one bit at a time)"
201 Calculate checksum one bit at a time. This is VERY slow, but has
202 no lookup table. This is provided as a debugging option.
204 Only choose this option if you are debugging crc32.
209 tristate "CRC64 functions"
211 This option is provided for the case where no in-kernel-tree
212 modules require CRC64 functions, but a module built outside
213 the kernel tree does. Such modules that use library CRC64
214 functions require M here.
217 tristate "CRC4 functions"
219 This option is provided for the case where no in-kernel-tree
220 modules require CRC4 functions, but a module built outside
221 the kernel tree does. Such modules that use library CRC4
222 functions require M here.
225 tristate "CRC7 functions"
227 This option is provided for the case where no in-kernel-tree
228 modules require CRC7 functions, but a module built outside
229 the kernel tree does. Such modules that use library CRC7
230 functions require M here.
233 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
237 This option is provided for the case where no in-kernel-tree
238 modules require CRC32c functions, but a module built outside the
239 kernel tree does. Such modules that use library CRC32c functions
240 require M here. See Castagnoli93.
241 Module will be libcrc32c.
244 tristate "CRC8 function"
246 This option provides CRC8 function. Drivers may select this
247 when they need to do cyclic redundancy check according CRC8
248 algorithm. Module will be called crc8.
255 depends on AUDIT && !AUDIT_ARCH
258 config AUDIT_ARCH_COMPAT_GENERIC
262 config AUDIT_COMPAT_GENERIC
264 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
267 config RANDOM32_SELFTEST
268 bool "PRNG perform self test on init"
270 This option enables the 32 bit PRNG library functions to perform a
271 self test on initialization.
274 # compression support is select'ed if needed
280 config 842_DECOMPRESS
294 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
296 Enable s390x hardware support for zlib in the kernel.
301 config LZO_DECOMPRESS
307 config LZ4HC_COMPRESS
310 config LZ4_DECOMPRESS
317 config ZSTD_DECOMPRESS
321 source "lib/xz/Kconfig"
324 # These all provide a common interface (hence the apparent duplication with
325 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
327 config DECOMPRESS_GZIP
331 config DECOMPRESS_BZIP2
334 config DECOMPRESS_LZMA
341 config DECOMPRESS_LZO
342 select LZO_DECOMPRESS
345 config DECOMPRESS_LZ4
346 select LZ4_DECOMPRESS
349 config DECOMPRESS_ZSTD
350 select ZSTD_DECOMPRESS
354 # Generic allocator support is selected if needed
356 config GENERIC_ALLOCATOR
360 # reed solomon support is select'ed if needed
365 config REED_SOLOMON_ENC8
368 config REED_SOLOMON_DEC8
371 config REED_SOLOMON_ENC16
374 config REED_SOLOMON_DEC16
378 # BCH support is selected if needed
383 config BCH_CONST_PARAMS
386 Drivers may select this option to force specific constant
387 values for parameters 'm' (Galois field order) and 't'
388 (error correction capability). Those specific values must
389 be set by declaring default values for symbols BCH_CONST_M
391 Doing so will enable extra compiler optimizations,
392 improving encoding and decoding performance up to 2x for
393 usual (m,t) values (typically such that m*t < 200).
394 When this option is selected, the BCH library supports
395 only a single (m,t) configuration. This is mainly useful
396 for NAND flash board drivers requiring known, fixed BCH
403 Constant value for Galois field order 'm'. If 'k' is the
404 number of data bits to protect, 'm' should be chosen such
405 that (k + m*t) <= 2**m - 1.
406 Drivers should declare a default value for this symbol if
407 they select option BCH_CONST_PARAMS.
412 Constant value for error correction capability in bits 't'.
413 Drivers should declare a default value for this symbol if
414 they select option BCH_CONST_PARAMS.
417 # Textsearch support is select'ed if needed
422 config TEXTSEARCH_KMP
428 config TEXTSEARCH_FSM
437 Simple, embeddable, interval-tree. Can find the start of an
438 overlapping range in log(n) time and then iterate over all
439 overlapping nodes. The algorithm is implemented as an
444 Documentation/core-api/rbtree.rst
446 for more information.
451 Support entries which occupy multiple consecutive indices in the
454 config ASSOCIATIVE_ARRAY
457 Generic associative array. Can be searched and iterated over whilst
458 it is being modified. It is also reasonably quick to search and
459 modify. The algorithms are non-recursive, and the trees are highly
464 Documentation/core-api/assoc_array.rst
466 for more information.
473 config HAS_IOPORT_MAP
475 depends on HAS_IOMEM && !NO_IOPORT_MAP
478 source "kernel/dma/Kconfig"
487 config CHECK_SIGNATURE
490 config CPUMASK_OFFSTACK
491 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
493 Use dynamic allocation for cpumask_var_t, instead of putting
494 them on the stack. This is a bit more expensive, but avoids
506 # This actually supports modular compilation, but the module overhead
507 # is ridiculous for the amount of code involved. Until an out-of-tree
508 # driver asks for it, we'll just link it directly it into the kernel
509 # when required. Since we're ignoring out-of-tree users, there's also
510 # no need bother prompting for a manual decision:
511 # prompt "glob_match() function"
513 This option provides a glob_match function for performing
514 simple text pattern matching. It originated in the ATA code
515 to blacklist particular drive models, but other device drivers
516 may need similar functionality.
518 All drivers in the Linux kernel tree that require this function
519 should automatically select this option. Say N unless you
520 are compiling an out-of tree driver which tells you that it
524 tristate "glob self-test on init"
527 This option enables a simple self-test of the glob_match
528 function on startup. It is primarily useful for people
529 working on the code to ensure they haven't introduced any
532 It only adds a little bit of code and slows kernel boot (or
533 module load) by a small amount, so you're welcome to play with
534 it, but you probably don't need it.
537 # Netlink attribute parsing support is select'ed if needed
543 # Generic 64-bit atomic support is selected if needed
545 config GENERIC_ATOMIC64
555 bool "IRQ polling library"
557 Helper library to poll interrupt mitigation using polling.
563 Multiprecision maths library from GnuPG.
564 It is used to implement RSA digital signature verification,
565 which is used by IMA/EVM digital signature extension.
574 Digital signature verification. Currently only RSA is supported.
575 Implementation is done using GnuPG MPI library
580 Dynamic Interrupt Moderation library.
581 Implements an algorithm for dynamically changing CQ moderation values
582 according to run time performance.
585 # libfdt files, only selected if needed.
593 Enable fast lookup object identifier registry.
601 source "lib/vdso/Kconfig"
603 source "lib/fonts/Kconfig"
608 Provides a helper to split scatterlists into chunks, each chunk being
609 a scatterlist. This should be selected by a driver or an API which
610 whishes to split a scatterlist amongst multiple DMA channels.
615 Provides a helper to allocate chained scatterlists. This should be
616 selected by a driver or an API which whishes to allocate chained
623 config ARCH_NO_SG_CHAIN
626 config ARCH_HAS_PMEM_API
632 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
635 # use memcpy to implement user copies for nommu architectures
636 config UACCESS_MEMCPY
639 config ARCH_HAS_UACCESS_FLUSHCACHE
642 # arch has a concept of a recoverable synchronous exception due to a
643 # memory-read error like x86 machine-check or ARM data-abort, and
644 # implements copy_mc_to_{user,kernel} to abort and report
645 # 'bytes-transferred' if that exception fires when accessing the source
647 config ARCH_HAS_COPY_MC
650 # Temporary. Goes away when all archs are cleaned up
651 config ARCH_STACKWALK
662 tristate "parman" if COMPILE_TEST
665 tristate "objagg" if COMPILE_TEST
667 config STRING_SELFTEST
668 tristate "Test string functions"
672 config GENERIC_IOREMAP
675 config GENERIC_LIB_ASHLDI3
678 config GENERIC_LIB_ASHRDI3
681 config GENERIC_LIB_LSHRDI3
684 config GENERIC_LIB_MULDI3
687 config GENERIC_LIB_CMPDI2
690 config GENERIC_LIB_UCMPDI2