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
345 config DECOMPRESS_ZSTD
346 select ZSTD_DECOMPRESS
350 # Generic allocator support is selected if needed
352 config GENERIC_ALLOCATOR
356 # reed solomon support is select'ed if needed
361 config REED_SOLOMON_ENC8
364 config REED_SOLOMON_DEC8
367 config REED_SOLOMON_ENC16
370 config REED_SOLOMON_DEC16
374 # BCH support is selected if needed
379 config BCH_CONST_PARAMS
382 Drivers may select this option to force specific constant
383 values for parameters 'm' (Galois field order) and 't'
384 (error correction capability). Those specific values must
385 be set by declaring default values for symbols BCH_CONST_M
387 Doing so will enable extra compiler optimizations,
388 improving encoding and decoding performance up to 2x for
389 usual (m,t) values (typically such that m*t < 200).
390 When this option is selected, the BCH library supports
391 only a single (m,t) configuration. This is mainly useful
392 for NAND flash board drivers requiring known, fixed BCH
399 Constant value for Galois field order 'm'. If 'k' is the
400 number of data bits to protect, 'm' should be chosen such
401 that (k + m*t) <= 2**m - 1.
402 Drivers should declare a default value for this symbol if
403 they select option BCH_CONST_PARAMS.
408 Constant value for error correction capability in bits 't'.
409 Drivers should declare a default value for this symbol if
410 they select option BCH_CONST_PARAMS.
413 # Textsearch support is select'ed if needed
418 config TEXTSEARCH_KMP
424 config TEXTSEARCH_FSM
433 Simple, embeddable, interval-tree. Can find the start of an
434 overlapping range in log(n) time and then iterate over all
435 overlapping nodes. The algorithm is implemented as an
440 Documentation/core-api/rbtree.rst
442 for more information.
447 Support entries which occupy multiple consecutive indices in the
450 config ASSOCIATIVE_ARRAY
453 Generic associative array. Can be searched and iterated over whilst
454 it is being modified. It is also reasonably quick to search and
455 modify. The algorithms are non-recursive, and the trees are highly
460 Documentation/core-api/assoc_array.rst
462 for more information.
469 config HAS_IOPORT_MAP
471 depends on HAS_IOMEM && !NO_IOPORT_MAP
474 source "kernel/dma/Kconfig"
483 config CHECK_SIGNATURE
486 config CPUMASK_OFFSTACK
487 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
489 Use dynamic allocation for cpumask_var_t, instead of putting
490 them on the stack. This is a bit more expensive, but avoids
502 # This actually supports modular compilation, but the module overhead
503 # is ridiculous for the amount of code involved. Until an out-of-tree
504 # driver asks for it, we'll just link it directly it into the kernel
505 # when required. Since we're ignoring out-of-tree users, there's also
506 # no need bother prompting for a manual decision:
507 # prompt "glob_match() function"
509 This option provides a glob_match function for performing
510 simple text pattern matching. It originated in the ATA code
511 to blacklist particular drive models, but other device drivers
512 may need similar functionality.
514 All drivers in the Linux kernel tree that require this function
515 should automatically select this option. Say N unless you
516 are compiling an out-of tree driver which tells you that it
520 tristate "glob self-test on init"
523 This option enables a simple self-test of the glob_match
524 function on startup. It is primarily useful for people
525 working on the code to ensure they haven't introduced any
528 It only adds a little bit of code and slows kernel boot (or
529 module load) by a small amount, so you're welcome to play with
530 it, but you probably don't need it.
533 # Netlink attribute parsing support is select'ed if needed
539 # Generic 64-bit atomic support is selected if needed
541 config GENERIC_ATOMIC64
551 bool "IRQ polling library"
553 Helper library to poll interrupt mitigation using polling.
559 Multiprecision maths library from GnuPG.
560 It is used to implement RSA digital signature verification,
561 which is used by IMA/EVM digital signature extension.
570 Digital signature verification. Currently only RSA is supported.
571 Implementation is done using GnuPG MPI library
576 Dynamic Interrupt Moderation library.
577 Implements an algorithm for dynamically changing CQ moderation values
578 according to run time performance.
581 # libfdt files, only selected if needed.
589 Enable fast lookup object identifier registry.
597 source "lib/vdso/Kconfig"
599 source "lib/fonts/Kconfig"
604 Provides a helper to split scatterlists into chunks, each chunk being
605 a scatterlist. This should be selected by a driver or an API which
606 whishes to split a scatterlist amongst multiple DMA channels.
611 Provides a helper to allocate chained scatterlists. This should be
612 selected by a driver or an API which whishes to allocate chained
619 config ARCH_NO_SG_CHAIN
622 config ARCH_HAS_PMEM_API
628 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
631 # use memcpy to implement user copies for nommu architectures
632 config UACCESS_MEMCPY
635 config ARCH_HAS_UACCESS_FLUSHCACHE
638 # arch has a concept of a recoverable synchronous exception due to a
639 # memory-read error like x86 machine-check or ARM data-abort, and
640 # implements copy_mc_to_{user,kernel} to abort and report
641 # 'bytes-transferred' if that exception fires when accessing the source
643 config ARCH_HAS_COPY_MC
646 # Temporary. Goes away when all archs are cleaned up
647 config ARCH_STACKWALK
658 tristate "parman" if COMPILE_TEST
661 tristate "objagg" if COMPILE_TEST
663 config STRING_SELFTEST
664 tristate "Test string functions"
668 config GENERIC_IOREMAP
671 config GENERIC_LIB_ASHLDI3
674 config GENERIC_LIB_ASHRDI3
677 config GENERIC_LIB_LSHRDI3
680 config GENERIC_LIB_MULDI3
683 config GENERIC_LIB_CMPDI2
686 config GENERIC_LIB_UCMPDI2