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 source "lib/math/Kconfig"
69 config NO_GENERIC_PCI_IOPORT_MAP
72 config GENERIC_PCI_IOMAP
77 select GENERIC_PCI_IOMAP
82 config ARCH_USE_CMPXCHG_LOCKREF
85 config ARCH_HAS_FAST_MULTIPLIER
88 config ARCH_USE_SYM_ANNOTATIONS
92 bool "Access I/O in non-MMIO mode"
95 On some platforms where no separate I/O space exists, there are I/O
96 hosts which can not be accessed in MMIO mode. Using the logical PIO
97 mechanism, the host-local I/O resource can be mapped into system
98 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
99 system can access the I/O devices with the mapped-logic PIO through
102 This way has relatively little I/O performance cost. Please make
103 sure your devices really need this configure item enabled.
105 When in doubt, say N.
107 config INDIRECT_IOMEM
110 This is selected by other options/architectures to provide the
111 emulated iomem accessors.
113 config INDIRECT_IOMEM_FALLBACK
115 depends on INDIRECT_IOMEM
117 If INDIRECT_IOMEM is selected, this enables falling back to plain
118 mmio accesses when the IO memory address is not a registered
121 source "lib/crypto/Kconfig"
124 tristate "CRC-CCITT functions"
126 This option is provided for the case where no in-kernel-tree
127 modules require CRC-CCITT functions, but a module built outside
128 the kernel tree does. Such modules that use library CRC-CCITT
129 functions require M here.
132 tristate "CRC16 functions"
134 This option is provided for the case where no in-kernel-tree
135 modules require CRC16 functions, but a module built outside
136 the kernel tree does. Such modules that use library CRC16
137 functions require M here.
140 tristate "CRC calculation for the T10 Data Integrity Field"
142 select CRYPTO_CRCT10DIF
144 This option is only needed if a module that's not in the
145 kernel tree needs to calculate CRC checks for use with the
146 SCSI data integrity subsystem.
149 tristate "CRC ITU-T V.41 functions"
151 This option is provided for the case where no in-kernel-tree
152 modules require CRC ITU-T V.41 functions, but a module built outside
153 the kernel tree does. Such modules that use library CRC ITU-T V.41
154 functions require M here.
157 tristate "CRC32/CRC32c functions"
161 This option is provided for the case where no in-kernel-tree
162 modules require CRC32/CRC32c functions, but a module built outside
163 the kernel tree does. Such modules that use library CRC32/CRC32c
164 functions require M here.
166 config CRC32_SELFTEST
167 tristate "CRC32 perform self test on init"
170 This option enables the CRC32 library functions to perform a
171 self test on initialization. The self test computes crc32_le
172 and crc32_be over byte strings with random alignment and length
173 and computes the total elapsed time and number of bytes processed.
176 prompt "CRC32 implementation"
178 default CRC32_SLICEBY8
180 This option allows a kernel builder to override the default choice
181 of CRC32 algorithm. Choose the default ("slice by 8") unless you
182 know that you need one of the others.
184 config CRC32_SLICEBY8
185 bool "Slice by 8 bytes"
187 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
188 This is the fastest algorithm, but comes with a 8KiB lookup table.
189 Most modern processors have enough cache to hold this table without
192 This is the default implementation choice. Choose this one unless
193 you have a good reason not to.
195 config CRC32_SLICEBY4
196 bool "Slice by 4 bytes"
198 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
199 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
202 Only choose this option if you know what you are doing.
205 bool "Sarwate's Algorithm (one byte at a time)"
207 Calculate checksum a byte at a time using Sarwate's algorithm. This
208 is not particularly fast, but has a small 256 byte lookup table.
210 Only choose this option if you know what you are doing.
213 bool "Classic Algorithm (one bit at a time)"
215 Calculate checksum one bit at a time. This is VERY slow, but has
216 no lookup table. This is provided as a debugging option.
218 Only choose this option if you are debugging crc32.
223 tristate "CRC64 functions"
225 This option is provided for the case where no in-kernel-tree
226 modules require CRC64 functions, but a module built outside
227 the kernel tree does. Such modules that use library CRC64
228 functions require M here.
231 tristate "CRC4 functions"
233 This option is provided for the case where no in-kernel-tree
234 modules require CRC4 functions, but a module built outside
235 the kernel tree does. Such modules that use library CRC4
236 functions require M here.
239 tristate "CRC7 functions"
241 This option is provided for the case where no in-kernel-tree
242 modules require CRC7 functions, but a module built outside
243 the kernel tree does. Such modules that use library CRC7
244 functions require M here.
247 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
251 This option is provided for the case where no in-kernel-tree
252 modules require CRC32c functions, but a module built outside the
253 kernel tree does. Such modules that use library CRC32c functions
254 require M here. See Castagnoli93.
255 Module will be libcrc32c.
258 tristate "CRC8 function"
260 This option provides CRC8 function. Drivers may select this
261 when they need to do cyclic redundancy check according CRC8
262 algorithm. Module will be called crc8.
269 depends on AUDIT && !AUDIT_ARCH
272 config AUDIT_ARCH_COMPAT_GENERIC
276 config AUDIT_COMPAT_GENERIC
278 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
281 config RANDOM32_SELFTEST
282 bool "PRNG perform self test on init"
284 This option enables the 32 bit PRNG library functions to perform a
285 self test on initialization.
288 # compression support is select'ed if needed
294 config 842_DECOMPRESS
308 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
310 Enable s390x hardware support for zlib in the kernel.
315 config LZO_DECOMPRESS
321 config LZ4HC_COMPRESS
324 config LZ4_DECOMPRESS
331 config ZSTD_DECOMPRESS
335 source "lib/xz/Kconfig"
338 # These all provide a common interface (hence the apparent duplication with
339 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
341 config DECOMPRESS_GZIP
345 config DECOMPRESS_BZIP2
348 config DECOMPRESS_LZMA
355 config DECOMPRESS_LZO
356 select LZO_DECOMPRESS
359 config DECOMPRESS_LZ4
360 select LZ4_DECOMPRESS
363 config DECOMPRESS_ZSTD
364 select ZSTD_DECOMPRESS
368 # Generic allocator support is selected if needed
370 config GENERIC_ALLOCATOR
374 # reed solomon support is select'ed if needed
379 config REED_SOLOMON_ENC8
382 config REED_SOLOMON_DEC8
385 config REED_SOLOMON_ENC16
388 config REED_SOLOMON_DEC16
392 # BCH support is selected if needed
397 config BCH_CONST_PARAMS
400 Drivers may select this option to force specific constant
401 values for parameters 'm' (Galois field order) and 't'
402 (error correction capability). Those specific values must
403 be set by declaring default values for symbols BCH_CONST_M
405 Doing so will enable extra compiler optimizations,
406 improving encoding and decoding performance up to 2x for
407 usual (m,t) values (typically such that m*t < 200).
408 When this option is selected, the BCH library supports
409 only a single (m,t) configuration. This is mainly useful
410 for NAND flash board drivers requiring known, fixed BCH
417 Constant value for Galois field order 'm'. If 'k' is the
418 number of data bits to protect, 'm' should be chosen such
419 that (k + m*t) <= 2**m - 1.
420 Drivers should declare a default value for this symbol if
421 they select option BCH_CONST_PARAMS.
426 Constant value for error correction capability in bits 't'.
427 Drivers should declare a default value for this symbol if
428 they select option BCH_CONST_PARAMS.
431 # Textsearch support is select'ed if needed
436 config TEXTSEARCH_KMP
442 config TEXTSEARCH_FSM
451 Simple, embeddable, interval-tree. Can find the start of an
452 overlapping range in log(n) time and then iterate over all
453 overlapping nodes. The algorithm is implemented as an
458 Documentation/core-api/rbtree.rst
460 for more information.
465 Support entries which occupy multiple consecutive indices in the
468 config ASSOCIATIVE_ARRAY
471 Generic associative array. Can be searched and iterated over whilst
472 it is being modified. It is also reasonably quick to search and
473 modify. The algorithms are non-recursive, and the trees are highly
478 Documentation/core-api/assoc_array.rst
480 for more information.
487 config HAS_IOPORT_MAP
489 depends on HAS_IOMEM && !NO_IOPORT_MAP
492 source "kernel/dma/Kconfig"
501 config CHECK_SIGNATURE
504 config CPUMASK_OFFSTACK
505 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
507 Use dynamic allocation for cpumask_var_t, instead of putting
508 them on the stack. This is a bit more expensive, but avoids
520 # This actually supports modular compilation, but the module overhead
521 # is ridiculous for the amount of code involved. Until an out-of-tree
522 # driver asks for it, we'll just link it directly it into the kernel
523 # when required. Since we're ignoring out-of-tree users, there's also
524 # no need bother prompting for a manual decision:
525 # prompt "glob_match() function"
527 This option provides a glob_match function for performing
528 simple text pattern matching. It originated in the ATA code
529 to blacklist particular drive models, but other device drivers
530 may need similar functionality.
532 All drivers in the Linux kernel tree that require this function
533 should automatically select this option. Say N unless you
534 are compiling an out-of tree driver which tells you that it
538 tristate "glob self-test on init"
541 This option enables a simple self-test of the glob_match
542 function on startup. It is primarily useful for people
543 working on the code to ensure they haven't introduced any
546 It only adds a little bit of code and slows kernel boot (or
547 module load) by a small amount, so you're welcome to play with
548 it, but you probably don't need it.
551 # Netlink attribute parsing support is select'ed if needed
557 # Generic 64-bit atomic support is selected if needed
559 config GENERIC_ATOMIC64
569 bool "IRQ polling library"
571 Helper library to poll interrupt mitigation using polling.
577 Multiprecision maths library from GnuPG.
578 It is used to implement RSA digital signature verification,
579 which is used by IMA/EVM digital signature extension.
588 Digital signature verification. Currently only RSA is supported.
589 Implementation is done using GnuPG MPI library
594 Dynamic Interrupt Moderation library.
595 Implements an algorithm for dynamically changing CQ moderation values
596 according to run time performance.
599 # libfdt files, only selected if needed.
607 Enable fast lookup object identifier registry.
615 source "lib/vdso/Kconfig"
617 source "lib/fonts/Kconfig"
622 Provides a helper to split scatterlists into chunks, each chunk being
623 a scatterlist. This should be selected by a driver or an API which
624 whishes to split a scatterlist amongst multiple DMA channels.
629 Provides a helper to allocate chained scatterlists. This should be
630 selected by a driver or an API which whishes to allocate chained
637 config ARCH_NO_SG_CHAIN
640 config ARCH_HAS_PMEM_API
646 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
649 # use memcpy to implement user copies for nommu architectures
650 config UACCESS_MEMCPY
653 config ARCH_HAS_UACCESS_FLUSHCACHE
656 # arch has a concept of a recoverable synchronous exception due to a
657 # memory-read error like x86 machine-check or ARM data-abort, and
658 # implements copy_mc_to_{user,kernel} to abort and report
659 # 'bytes-transferred' if that exception fires when accessing the source
661 config ARCH_HAS_COPY_MC
664 # Temporary. Goes away when all archs are cleaned up
665 config ARCH_STACKWALK
672 config STACKDEPOT_ALWAYS_INIT
676 config STACK_HASH_ORDER
677 int "stack depot hash size (12 => 4KB, 20 => 1024KB)"
680 depends on STACKDEPOT
682 Select the hash size as a power of 2 for the stackdepot hash table.
683 Choose a lower value to reduce the memory impact.
687 depends on STACKTRACE_SUPPORT
694 tristate "parman" if COMPILE_TEST
697 tristate "objagg" if COMPILE_TEST
701 config GENERIC_IOREMAP
704 config GENERIC_LIB_ASHLDI3
707 config GENERIC_LIB_ASHRDI3
710 config GENERIC_LIB_LSHRDI3
713 config GENERIC_LIB_MULDI3
716 config GENERIC_LIB_CMPDI2
719 config GENERIC_LIB_UCMPDI2
722 config GENERIC_LIB_DEVMEM_IS_ALLOWED