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 ARCH_HAS_STRNCPY_FROM_USER
55 config ARCH_HAS_STRNLEN_USER
58 config GENERIC_STRNCPY_FROM_USER
59 def_bool !ARCH_HAS_STRNCPY_FROM_USER
61 config GENERIC_STRNLEN_USER
62 def_bool !ARCH_HAS_STRNLEN_USER
64 config GENERIC_NET_UTILS
67 config GENERIC_FIND_FIRST_BIT
70 source "lib/math/Kconfig"
72 config NO_GENERIC_PCI_IOPORT_MAP
75 config GENERIC_PCI_IOMAP
80 select GENERIC_PCI_IOMAP
85 config ARCH_USE_CMPXCHG_LOCKREF
88 config ARCH_HAS_FAST_MULTIPLIER
91 config ARCH_USE_SYM_ANNOTATIONS
95 bool "Access I/O in non-MMIO mode"
98 On some platforms where no separate I/O space exists, there are I/O
99 hosts which can not be accessed in MMIO mode. Using the logical PIO
100 mechanism, the host-local I/O resource can be mapped into system
101 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
102 system can access the I/O devices with the mapped-logic PIO through
105 This way has relatively little I/O performance cost. Please make
106 sure your devices really need this configure item enabled.
108 When in doubt, say N.
110 config INDIRECT_IOMEM
113 This is selected by other options/architectures to provide the
114 emulated iomem accessors.
116 config INDIRECT_IOMEM_FALLBACK
118 depends on INDIRECT_IOMEM
120 If INDIRECT_IOMEM is selected, this enables falling back to plain
121 mmio accesses when the IO memory address is not a registered
124 source "lib/crypto/Kconfig"
130 tristate "CRC-CCITT functions"
132 This option is provided for the case where no in-kernel-tree
133 modules require CRC-CCITT functions, but a module built outside
134 the kernel tree does. Such modules that use library CRC-CCITT
135 functions require M here.
138 tristate "CRC16 functions"
140 This option is provided for the case where no in-kernel-tree
141 modules require CRC16 functions, but a module built outside
142 the kernel tree does. Such modules that use library CRC16
143 functions require M here.
146 tristate "CRC calculation for the T10 Data Integrity Field"
148 select CRYPTO_CRCT10DIF
150 This option is only needed if a module that's not in the
151 kernel tree needs to calculate CRC checks for use with the
152 SCSI data integrity subsystem.
155 tristate "CRC ITU-T V.41 functions"
157 This option is provided for the case where no in-kernel-tree
158 modules require CRC ITU-T V.41 functions, but a module built outside
159 the kernel tree does. Such modules that use library CRC ITU-T V.41
160 functions require M here.
163 tristate "CRC32/CRC32c functions"
167 This option is provided for the case where no in-kernel-tree
168 modules require CRC32/CRC32c functions, but a module built outside
169 the kernel tree does. Such modules that use library CRC32/CRC32c
170 functions require M here.
172 config CRC32_SELFTEST
173 tristate "CRC32 perform self test on init"
176 This option enables the CRC32 library functions to perform a
177 self test on initialization. The self test computes crc32_le
178 and crc32_be over byte strings with random alignment and length
179 and computes the total elapsed time and number of bytes processed.
182 prompt "CRC32 implementation"
184 default CRC32_SLICEBY8
186 This option allows a kernel builder to override the default choice
187 of CRC32 algorithm. Choose the default ("slice by 8") unless you
188 know that you need one of the others.
190 config CRC32_SLICEBY8
191 bool "Slice by 8 bytes"
193 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
194 This is the fastest algorithm, but comes with a 8KiB lookup table.
195 Most modern processors have enough cache to hold this table without
198 This is the default implementation choice. Choose this one unless
199 you have a good reason not to.
201 config CRC32_SLICEBY4
202 bool "Slice by 4 bytes"
204 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
205 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
208 Only choose this option if you know what you are doing.
211 bool "Sarwate's Algorithm (one byte at a time)"
213 Calculate checksum a byte at a time using Sarwate's algorithm. This
214 is not particularly fast, but has a small 256 byte lookup table.
216 Only choose this option if you know what you are doing.
219 bool "Classic Algorithm (one bit at a time)"
221 Calculate checksum one bit at a time. This is VERY slow, but has
222 no lookup table. This is provided as a debugging option.
224 Only choose this option if you are debugging crc32.
229 tristate "CRC64 functions"
231 This option is provided for the case where no in-kernel-tree
232 modules require CRC64 functions, but a module built outside
233 the kernel tree does. Such modules that use library CRC64
234 functions require M here.
237 tristate "CRC4 functions"
239 This option is provided for the case where no in-kernel-tree
240 modules require CRC4 functions, but a module built outside
241 the kernel tree does. Such modules that use library CRC4
242 functions require M here.
245 tristate "CRC7 functions"
247 This option is provided for the case where no in-kernel-tree
248 modules require CRC7 functions, but a module built outside
249 the kernel tree does. Such modules that use library CRC7
250 functions require M here.
253 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
257 This option is provided for the case where no in-kernel-tree
258 modules require CRC32c functions, but a module built outside the
259 kernel tree does. Such modules that use library CRC32c functions
260 require M here. See Castagnoli93.
261 Module will be libcrc32c.
264 tristate "CRC8 function"
266 This option provides CRC8 function. Drivers may select this
267 when they need to do cyclic redundancy check according CRC8
268 algorithm. Module will be called crc8.
275 depends on AUDIT && !AUDIT_ARCH
278 config AUDIT_ARCH_COMPAT_GENERIC
282 config AUDIT_COMPAT_GENERIC
284 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
287 config RANDOM32_SELFTEST
288 bool "PRNG perform self test on init"
290 This option enables the 32 bit PRNG library functions to perform a
291 self test on initialization.
294 # compression support is select'ed if needed
300 config 842_DECOMPRESS
314 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
316 Enable s390x hardware support for zlib in the kernel.
321 config LZO_DECOMPRESS
327 config LZ4HC_COMPRESS
330 config LZ4_DECOMPRESS
337 config ZSTD_DECOMPRESS
341 source "lib/xz/Kconfig"
344 # These all provide a common interface (hence the apparent duplication with
345 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
347 config DECOMPRESS_GZIP
351 config DECOMPRESS_BZIP2
354 config DECOMPRESS_LZMA
361 config DECOMPRESS_LZO
362 select LZO_DECOMPRESS
365 config DECOMPRESS_LZ4
366 select LZ4_DECOMPRESS
369 config DECOMPRESS_ZSTD
370 select ZSTD_DECOMPRESS
374 # Generic allocator support is selected if needed
376 config GENERIC_ALLOCATOR
380 # reed solomon support is select'ed if needed
385 config REED_SOLOMON_ENC8
388 config REED_SOLOMON_DEC8
391 config REED_SOLOMON_ENC16
394 config REED_SOLOMON_DEC16
398 # BCH support is selected if needed
403 config BCH_CONST_PARAMS
406 Drivers may select this option to force specific constant
407 values for parameters 'm' (Galois field order) and 't'
408 (error correction capability). Those specific values must
409 be set by declaring default values for symbols BCH_CONST_M
411 Doing so will enable extra compiler optimizations,
412 improving encoding and decoding performance up to 2x for
413 usual (m,t) values (typically such that m*t < 200).
414 When this option is selected, the BCH library supports
415 only a single (m,t) configuration. This is mainly useful
416 for NAND flash board drivers requiring known, fixed BCH
423 Constant value for Galois field order 'm'. If 'k' is the
424 number of data bits to protect, 'm' should be chosen such
425 that (k + m*t) <= 2**m - 1.
426 Drivers should declare a default value for this symbol if
427 they select option BCH_CONST_PARAMS.
432 Constant value for error correction capability in bits 't'.
433 Drivers should declare a default value for this symbol if
434 they select option BCH_CONST_PARAMS.
437 # Textsearch support is select'ed if needed
442 config TEXTSEARCH_KMP
448 config TEXTSEARCH_FSM
457 Simple, embeddable, interval-tree. Can find the start of an
458 overlapping range in log(n) time and then iterate over all
459 overlapping nodes. The algorithm is implemented as an
464 Documentation/core-api/rbtree.rst
466 for more information.
471 Support entries which occupy multiple consecutive indices in the
474 config ASSOCIATIVE_ARRAY
477 Generic associative array. Can be searched and iterated over whilst
478 it is being modified. It is also reasonably quick to search and
479 modify. The algorithms are non-recursive, and the trees are highly
484 Documentation/core-api/assoc_array.rst
486 for more information.
493 config HAS_IOPORT_MAP
495 depends on HAS_IOMEM && !NO_IOPORT_MAP
498 source "kernel/dma/Kconfig"
507 config CHECK_SIGNATURE
510 config CPUMASK_OFFSTACK
511 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
513 Use dynamic allocation for cpumask_var_t, instead of putting
514 them on the stack. This is a bit more expensive, but avoids
526 # This actually supports modular compilation, but the module overhead
527 # is ridiculous for the amount of code involved. Until an out-of-tree
528 # driver asks for it, we'll just link it directly it into the kernel
529 # when required. Since we're ignoring out-of-tree users, there's also
530 # no need bother prompting for a manual decision:
531 # prompt "glob_match() function"
533 This option provides a glob_match function for performing
534 simple text pattern matching. It originated in the ATA code
535 to blacklist particular drive models, but other device drivers
536 may need similar functionality.
538 All drivers in the Linux kernel tree that require this function
539 should automatically select this option. Say N unless you
540 are compiling an out-of tree driver which tells you that it
544 tristate "glob self-test on init"
547 This option enables a simple self-test of the glob_match
548 function on startup. It is primarily useful for people
549 working on the code to ensure they haven't introduced any
552 It only adds a little bit of code and slows kernel boot (or
553 module load) by a small amount, so you're welcome to play with
554 it, but you probably don't need it.
557 # Netlink attribute parsing support is select'ed if needed
563 # Generic 64-bit atomic support is selected if needed
565 config GENERIC_ATOMIC64
575 bool "IRQ polling library"
577 Helper library to poll interrupt mitigation using polling.
583 Multiprecision maths library from GnuPG.
584 It is used to implement RSA digital signature verification,
585 which is used by IMA/EVM digital signature extension.
594 Digital signature verification. Currently only RSA is supported.
595 Implementation is done using GnuPG MPI library
600 Dynamic Interrupt Moderation library.
601 Implements an algorithm for dynamically changing CQ moderation values
602 according to run time performance.
605 # libfdt files, only selected if needed.
613 Enable fast lookup object identifier registry.
621 source "lib/vdso/Kconfig"
623 source "lib/fonts/Kconfig"
628 Provides a helper to split scatterlists into chunks, each chunk being
629 a scatterlist. This should be selected by a driver or an API which
630 whishes to split a scatterlist amongst multiple DMA channels.
635 Provides a helper to allocate chained scatterlists. This should be
636 selected by a driver or an API which whishes to allocate chained
643 config ARCH_NO_SG_CHAIN
646 config ARCH_HAS_PMEM_API
652 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
655 # use memcpy to implement user copies for nommu architectures
656 config UACCESS_MEMCPY
659 config ARCH_HAS_UACCESS_FLUSHCACHE
662 # arch has a concept of a recoverable synchronous exception due to a
663 # memory-read error like x86 machine-check or ARM data-abort, and
664 # implements copy_mc_to_{user,kernel} to abort and report
665 # 'bytes-transferred' if that exception fires when accessing the source
667 config ARCH_HAS_COPY_MC
670 # Temporary. Goes away when all archs are cleaned up
671 config ARCH_STACKWALK
678 config STACK_HASH_ORDER
679 int "stack depot hash size (12 => 4KB, 20 => 1024KB)"
682 depends on STACKDEPOT
684 Select the hash size as a power of 2 for the stackdepot hash table.
685 Choose a lower value to reduce the memory impact.
691 tristate "parman" if COMPILE_TEST
694 tristate "objagg" if COMPILE_TEST
698 config GENERIC_IOREMAP
701 config GENERIC_LIB_ASHLDI3
704 config GENERIC_LIB_ASHRDI3
707 config GENERIC_LIB_LSHRDI3
710 config GENERIC_LIB_MULDI3
713 config GENERIC_LIB_CMPDI2
716 config GENERIC_LIB_UCMPDI2
719 config GENERIC_LIB_DEVMEM_IS_ALLOWED