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.
105 config INDIRECT_IOMEM
108 This is selected by other options/architectures to provide the
109 emulated iomem accessors.
111 config INDIRECT_IOMEM_FALLBACK
113 depends on INDIRECT_IOMEM
115 If INDIRECT_IOMEM is selected, this enables falling back to plain
116 mmio accesses when the IO memory address is not a registered
120 tristate "CRC-CCITT functions"
122 This option is provided for the case where no in-kernel-tree
123 modules require CRC-CCITT functions, but a module built outside
124 the kernel tree does. Such modules that use library CRC-CCITT
125 functions require M here.
128 tristate "CRC16 functions"
130 This option is provided for the case where no in-kernel-tree
131 modules require CRC16 functions, but a module built outside
132 the kernel tree does. Such modules that use library CRC16
133 functions require M here.
136 tristate "CRC calculation for the T10 Data Integrity Field"
138 select CRYPTO_CRCT10DIF
140 This option is only needed if a module that's not in the
141 kernel tree needs to calculate CRC checks for use with the
142 SCSI data integrity subsystem.
145 tristate "CRC ITU-T V.41 functions"
147 This option is provided for the case where no in-kernel-tree
148 modules require CRC ITU-T V.41 functions, but a module built outside
149 the kernel tree does. Such modules that use library CRC ITU-T V.41
150 functions require M here.
153 tristate "CRC32/CRC32c functions"
157 This option is provided for the case where no in-kernel-tree
158 modules require CRC32/CRC32c functions, but a module built outside
159 the kernel tree does. Such modules that use library CRC32/CRC32c
160 functions require M here.
162 config CRC32_SELFTEST
163 tristate "CRC32 perform self test on init"
166 This option enables the CRC32 library functions to perform a
167 self test on initialization. The self test computes crc32_le
168 and crc32_be over byte strings with random alignment and length
169 and computes the total elapsed time and number of bytes processed.
172 prompt "CRC32 implementation"
174 default CRC32_SLICEBY8
176 This option allows a kernel builder to override the default choice
177 of CRC32 algorithm. Choose the default ("slice by 8") unless you
178 know that you need one of the others.
180 config CRC32_SLICEBY8
181 bool "Slice by 8 bytes"
183 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
184 This is the fastest algorithm, but comes with a 8KiB lookup table.
185 Most modern processors have enough cache to hold this table without
188 This is the default implementation choice. Choose this one unless
189 you have a good reason not to.
191 config CRC32_SLICEBY4
192 bool "Slice by 4 bytes"
194 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
195 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
198 Only choose this option if you know what you are doing.
201 bool "Sarwate's Algorithm (one byte at a time)"
203 Calculate checksum a byte at a time using Sarwate's algorithm. This
204 is not particularly fast, but has a small 256 byte lookup table.
206 Only choose this option if you know what you are doing.
209 bool "Classic Algorithm (one bit at a time)"
211 Calculate checksum one bit at a time. This is VERY slow, but has
212 no lookup table. This is provided as a debugging option.
214 Only choose this option if you are debugging crc32.
219 tristate "CRC64 functions"
221 This option is provided for the case where no in-kernel-tree
222 modules require CRC64 functions, but a module built outside
223 the kernel tree does. Such modules that use library CRC64
224 functions require M here.
227 tristate "CRC4 functions"
229 This option is provided for the case where no in-kernel-tree
230 modules require CRC4 functions, but a module built outside
231 the kernel tree does. Such modules that use library CRC4
232 functions require M here.
235 tristate "CRC7 functions"
237 This option is provided for the case where no in-kernel-tree
238 modules require CRC7 functions, but a module built outside
239 the kernel tree does. Such modules that use library CRC7
240 functions require M here.
243 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
247 This option is provided for the case where no in-kernel-tree
248 modules require CRC32c functions, but a module built outside the
249 kernel tree does. Such modules that use library CRC32c functions
250 require M here. See Castagnoli93.
251 Module will be libcrc32c.
254 tristate "CRC8 function"
256 This option provides CRC8 function. Drivers may select this
257 when they need to do cyclic redundancy check according CRC8
258 algorithm. Module will be called crc8.
265 depends on AUDIT && !AUDIT_ARCH
268 config AUDIT_ARCH_COMPAT_GENERIC
272 config AUDIT_COMPAT_GENERIC
274 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
277 config RANDOM32_SELFTEST
278 bool "PRNG perform self test on init"
280 This option enables the 32 bit PRNG library functions to perform a
281 self test on initialization.
284 # compression support is select'ed if needed
290 config 842_DECOMPRESS
304 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
306 Enable s390x hardware support for zlib in the kernel.
311 config LZO_DECOMPRESS
317 config LZ4HC_COMPRESS
320 config LZ4_DECOMPRESS
327 config ZSTD_DECOMPRESS
331 source "lib/xz/Kconfig"
334 # These all provide a common interface (hence the apparent duplication with
335 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
337 config DECOMPRESS_GZIP
341 config DECOMPRESS_BZIP2
344 config DECOMPRESS_LZMA
351 config DECOMPRESS_LZO
352 select LZO_DECOMPRESS
355 config DECOMPRESS_LZ4
356 select LZ4_DECOMPRESS
359 config DECOMPRESS_ZSTD
360 select ZSTD_DECOMPRESS
364 # Generic allocator support is selected if needed
366 config GENERIC_ALLOCATOR
370 # reed solomon support is select'ed if needed
375 config REED_SOLOMON_ENC8
378 config REED_SOLOMON_DEC8
381 config REED_SOLOMON_ENC16
384 config REED_SOLOMON_DEC16
388 # BCH support is selected if needed
393 config BCH_CONST_PARAMS
396 Drivers may select this option to force specific constant
397 values for parameters 'm' (Galois field order) and 't'
398 (error correction capability). Those specific values must
399 be set by declaring default values for symbols BCH_CONST_M
401 Doing so will enable extra compiler optimizations,
402 improving encoding and decoding performance up to 2x for
403 usual (m,t) values (typically such that m*t < 200).
404 When this option is selected, the BCH library supports
405 only a single (m,t) configuration. This is mainly useful
406 for NAND flash board drivers requiring known, fixed BCH
413 Constant value for Galois field order 'm'. If 'k' is the
414 number of data bits to protect, 'm' should be chosen such
415 that (k + m*t) <= 2**m - 1.
416 Drivers should declare a default value for this symbol if
417 they select option BCH_CONST_PARAMS.
422 Constant value for error correction capability in bits 't'.
423 Drivers should declare a default value for this symbol if
424 they select option BCH_CONST_PARAMS.
427 # Textsearch support is select'ed if needed
432 config TEXTSEARCH_KMP
438 config TEXTSEARCH_FSM
447 Simple, embeddable, interval-tree. Can find the start of an
448 overlapping range in log(n) time and then iterate over all
449 overlapping nodes. The algorithm is implemented as an
454 Documentation/core-api/rbtree.rst
456 for more information.
461 Support entries which occupy multiple consecutive indices in the
464 config ASSOCIATIVE_ARRAY
467 Generic associative array. Can be searched and iterated over whilst
468 it is being modified. It is also reasonably quick to search and
469 modify. The algorithms are non-recursive, and the trees are highly
474 Documentation/core-api/assoc_array.rst
476 for more information.
483 config HAS_IOPORT_MAP
485 depends on HAS_IOMEM && !NO_IOPORT_MAP
488 source "kernel/dma/Kconfig"
497 config CHECK_SIGNATURE
500 config CPUMASK_OFFSTACK
501 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
503 Use dynamic allocation for cpumask_var_t, instead of putting
504 them on the stack. This is a bit more expensive, but avoids
516 # This actually supports modular compilation, but the module overhead
517 # is ridiculous for the amount of code involved. Until an out-of-tree
518 # driver asks for it, we'll just link it directly it into the kernel
519 # when required. Since we're ignoring out-of-tree users, there's also
520 # no need bother prompting for a manual decision:
521 # prompt "glob_match() function"
523 This option provides a glob_match function for performing
524 simple text pattern matching. It originated in the ATA code
525 to blacklist particular drive models, but other device drivers
526 may need similar functionality.
528 All drivers in the Linux kernel tree that require this function
529 should automatically select this option. Say N unless you
530 are compiling an out-of tree driver which tells you that it
534 tristate "glob self-test on init"
537 This option enables a simple self-test of the glob_match
538 function on startup. It is primarily useful for people
539 working on the code to ensure they haven't introduced any
542 It only adds a little bit of code and slows kernel boot (or
543 module load) by a small amount, so you're welcome to play with
544 it, but you probably don't need it.
547 # Netlink attribute parsing support is select'ed if needed
553 # Generic 64-bit atomic support is selected if needed
555 config GENERIC_ATOMIC64
565 bool "IRQ polling library"
567 Helper library to poll interrupt mitigation using polling.
573 Multiprecision maths library from GnuPG.
574 It is used to implement RSA digital signature verification,
575 which is used by IMA/EVM digital signature extension.
584 Digital signature verification. Currently only RSA is supported.
585 Implementation is done using GnuPG MPI library
590 Dynamic Interrupt Moderation library.
591 Implements an algorithm for dynamically changing CQ moderation values
592 according to run time performance.
595 # libfdt files, only selected if needed.
603 Enable fast lookup object identifier registry.
611 source "lib/vdso/Kconfig"
613 source "lib/fonts/Kconfig"
618 Provides a helper to split scatterlists into chunks, each chunk being
619 a scatterlist. This should be selected by a driver or an API which
620 whishes to split a scatterlist amongst multiple DMA channels.
625 Provides a helper to allocate chained scatterlists. This should be
626 selected by a driver or an API which whishes to allocate chained
633 config ARCH_NO_SG_CHAIN
636 config ARCH_HAS_PMEM_API
642 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
645 # use memcpy to implement user copies for nommu architectures
646 config UACCESS_MEMCPY
649 config ARCH_HAS_UACCESS_FLUSHCACHE
652 # arch has a concept of a recoverable synchronous exception due to a
653 # memory-read error like x86 machine-check or ARM data-abort, and
654 # implements copy_mc_to_{user,kernel} to abort and report
655 # 'bytes-transferred' if that exception fires when accessing the source
657 config ARCH_HAS_COPY_MC
660 # Temporary. Goes away when all archs are cleaned up
661 config ARCH_STACKWALK
668 config STACK_HASH_ORDER
669 int "stack depot hash size (12 => 4KB, 20 => 1024KB)"
672 depends on STACKDEPOT
674 Select the hash size as a power of 2 for the stackdepot hash table.
675 Choose a lower value to reduce the memory impact.
681 tristate "parman" if COMPILE_TEST
684 tristate "objagg" if COMPILE_TEST
686 config STRING_SELFTEST
687 tristate "Test string functions"
691 config GENERIC_IOREMAP
694 config GENERIC_LIB_ASHLDI3
697 config GENERIC_LIB_ASHRDI3
700 config GENERIC_LIB_LSHRDI3
703 config GENERIC_LIB_MULDI3
706 config GENERIC_LIB_CMPDI2
709 config GENERIC_LIB_UCMPDI2
712 config GENERIC_LIB_DEVMEM_IS_ALLOWED