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"
30 This option provides the packing() helper function, which permits
31 converting bitfields between a CPU-usable representation and a
32 memory representation that can have any combination of these quirks:
33 - Is little endian (bytes are reversed within a 32-bit group)
34 - The least-significant 32-bit word comes first (within a 64-bit
36 - The most significant bit of a byte is at its right (bit 0 of a
37 register description is numerically 2^7).
38 Drivers may use these helpers to match the bit indices as described
39 in the data sheets of the peripherals they are in control of.
46 config HAVE_ARCH_BITREVERSE
50 This option enables the use of hardware bit-reversal instructions on
51 architectures which support such operations.
53 config ARCH_HAS_STRNCPY_FROM_USER
56 config ARCH_HAS_STRNLEN_USER
59 config GENERIC_STRNCPY_FROM_USER
60 def_bool !ARCH_HAS_STRNCPY_FROM_USER
62 config GENERIC_STRNLEN_USER
63 def_bool !ARCH_HAS_STRNLEN_USER
65 config GENERIC_NET_UTILS
68 source "lib/math/Kconfig"
70 config NO_GENERIC_PCI_IOPORT_MAP
73 config GENERIC_PCI_IOMAP
78 select GENERIC_PCI_IOMAP
83 config ARCH_USE_CMPXCHG_LOCKREF
86 config ARCH_HAS_FAST_MULTIPLIER
89 config ARCH_USE_SYM_ANNOTATIONS
93 bool "Access I/O in non-MMIO mode"
97 On some platforms where no separate I/O space exists, there are I/O
98 hosts which can not be accessed in MMIO mode. Using the logical PIO
99 mechanism, the host-local I/O resource can be mapped into system
100 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
101 system can access the I/O devices with the mapped-logic PIO through
104 This way has relatively little I/O performance cost. Please make
105 sure your devices really need this configure item enabled.
107 When in doubt, say N.
109 config INDIRECT_IOMEM
112 This is selected by other options/architectures to provide the
113 emulated iomem accessors.
115 config INDIRECT_IOMEM_FALLBACK
117 depends on INDIRECT_IOMEM
119 If INDIRECT_IOMEM is selected, this enables falling back to plain
120 mmio accesses when the IO memory address is not a registered
123 config TRACE_MMIO_ACCESS
124 bool "Register read/write tracing"
125 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS
127 Create tracepoints for MMIO read/write operations. These trace events
128 can be used for logging all MMIO read/write operations.
130 source "lib/crypto/Kconfig"
133 tristate "CRC-CCITT functions"
135 This option is provided for the case where no in-kernel-tree
136 modules require CRC-CCITT functions, but a module built outside
137 the kernel tree does. Such modules that use library CRC-CCITT
138 functions require M here.
141 tristate "CRC16 functions"
143 This option is provided for the case where no in-kernel-tree
144 modules require CRC16 functions, but a module built outside
145 the kernel tree does. Such modules that use library CRC16
146 functions require M here.
149 tristate "CRC calculation for the T10 Data Integrity Field"
151 select CRYPTO_CRCT10DIF
153 This option is only needed if a module that's not in the
154 kernel tree needs to calculate CRC checks for use with the
155 SCSI data integrity subsystem.
157 config CRC64_ROCKSOFT
158 tristate "CRC calculation for the Rocksoft model CRC64"
161 select CRYPTO_CRC64_ROCKSOFT
163 This option provides a CRC64 API to a registered crypto driver.
164 This is used with the block layer's data integrity subsystem.
167 tristate "CRC ITU-T V.41 functions"
169 This option is provided for the case where no in-kernel-tree
170 modules require CRC ITU-T V.41 functions, but a module built outside
171 the kernel tree does. Such modules that use library CRC ITU-T V.41
172 functions require M here.
175 tristate "CRC32/CRC32c functions"
179 This option is provided for the case where no in-kernel-tree
180 modules require CRC32/CRC32c functions, but a module built outside
181 the kernel tree does. Such modules that use library CRC32/CRC32c
182 functions require M here.
184 config CRC32_SELFTEST
185 tristate "CRC32 perform self test on init"
188 This option enables the CRC32 library functions to perform a
189 self test on initialization. The self test computes crc32_le
190 and crc32_be over byte strings with random alignment and length
191 and computes the total elapsed time and number of bytes processed.
194 prompt "CRC32 implementation"
196 default CRC32_SLICEBY8
198 This option allows a kernel builder to override the default choice
199 of CRC32 algorithm. Choose the default ("slice by 8") unless you
200 know that you need one of the others.
202 config CRC32_SLICEBY8
203 bool "Slice by 8 bytes"
205 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
206 This is the fastest algorithm, but comes with a 8KiB lookup table.
207 Most modern processors have enough cache to hold this table without
210 This is the default implementation choice. Choose this one unless
211 you have a good reason not to.
213 config CRC32_SLICEBY4
214 bool "Slice by 4 bytes"
216 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
217 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
220 Only choose this option if you know what you are doing.
223 bool "Sarwate's Algorithm (one byte at a time)"
225 Calculate checksum a byte at a time using Sarwate's algorithm. This
226 is not particularly fast, but has a small 256 byte lookup table.
228 Only choose this option if you know what you are doing.
231 bool "Classic Algorithm (one bit at a time)"
233 Calculate checksum one bit at a time. This is VERY slow, but has
234 no lookup table. This is provided as a debugging option.
236 Only choose this option if you are debugging crc32.
241 tristate "CRC64 functions"
243 This option is provided for the case where no in-kernel-tree
244 modules require CRC64 functions, but a module built outside
245 the kernel tree does. Such modules that use library CRC64
246 functions require M here.
249 tristate "CRC4 functions"
251 This option is provided for the case where no in-kernel-tree
252 modules require CRC4 functions, but a module built outside
253 the kernel tree does. Such modules that use library CRC4
254 functions require M here.
257 tristate "CRC7 functions"
259 This option is provided for the case where no in-kernel-tree
260 modules require CRC7 functions, but a module built outside
261 the kernel tree does. Such modules that use library CRC7
262 functions require M here.
265 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
269 This option is provided for the case where no in-kernel-tree
270 modules require CRC32c functions, but a module built outside the
271 kernel tree does. Such modules that use library CRC32c functions
272 require M here. See Castagnoli93.
273 Module will be libcrc32c.
276 tristate "CRC8 function"
278 This option provides CRC8 function. Drivers may select this
279 when they need to do cyclic redundancy check according CRC8
280 algorithm. Module will be called crc8.
287 depends on AUDIT && !AUDIT_ARCH
290 config AUDIT_ARCH_COMPAT_GENERIC
294 config AUDIT_COMPAT_GENERIC
296 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
299 config RANDOM32_SELFTEST
300 bool "PRNG perform self test on init"
302 This option enables the 32 bit PRNG library functions to perform a
303 self test on initialization.
306 # compression support is select'ed if needed
312 config 842_DECOMPRESS
326 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
328 Enable s390x hardware support for zlib in the kernel.
333 config LZO_DECOMPRESS
339 config LZ4HC_COMPRESS
342 config LZ4_DECOMPRESS
353 config ZSTD_DECOMPRESS
357 source "lib/xz/Kconfig"
360 # These all provide a common interface (hence the apparent duplication with
361 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
363 config DECOMPRESS_GZIP
367 config DECOMPRESS_BZIP2
370 config DECOMPRESS_LZMA
377 config DECOMPRESS_LZO
378 select LZO_DECOMPRESS
381 config DECOMPRESS_LZ4
382 select LZ4_DECOMPRESS
385 config DECOMPRESS_ZSTD
386 select ZSTD_DECOMPRESS
390 # Generic allocator support is selected if needed
392 config GENERIC_ALLOCATOR
396 # reed solomon support is select'ed if needed
401 config REED_SOLOMON_ENC8
404 config REED_SOLOMON_DEC8
407 config REED_SOLOMON_ENC16
410 config REED_SOLOMON_DEC16
414 # BCH support is selected if needed
419 config BCH_CONST_PARAMS
422 Drivers may select this option to force specific constant
423 values for parameters 'm' (Galois field order) and 't'
424 (error correction capability). Those specific values must
425 be set by declaring default values for symbols BCH_CONST_M
427 Doing so will enable extra compiler optimizations,
428 improving encoding and decoding performance up to 2x for
429 usual (m,t) values (typically such that m*t < 200).
430 When this option is selected, the BCH library supports
431 only a single (m,t) configuration. This is mainly useful
432 for NAND flash board drivers requiring known, fixed BCH
439 Constant value for Galois field order 'm'. If 'k' is the
440 number of data bits to protect, 'm' should be chosen such
441 that (k + m*t) <= 2**m - 1.
442 Drivers should declare a default value for this symbol if
443 they select option BCH_CONST_PARAMS.
448 Constant value for error correction capability in bits 't'.
449 Drivers should declare a default value for this symbol if
450 they select option BCH_CONST_PARAMS.
453 # Textsearch support is select'ed if needed
458 config TEXTSEARCH_KMP
464 config TEXTSEARCH_FSM
473 Simple, embeddable, interval-tree. Can find the start of an
474 overlapping range in log(n) time and then iterate over all
475 overlapping nodes. The algorithm is implemented as an
480 Documentation/core-api/rbtree.rst
482 for more information.
484 config INTERVAL_TREE_SPAN_ITER
486 depends on INTERVAL_TREE
491 Support entries which occupy multiple consecutive indices in the
494 config ASSOCIATIVE_ARRAY
497 Generic associative array. Can be searched and iterated over whilst
498 it is being modified. It is also reasonably quick to search and
499 modify. The algorithms are non-recursive, and the trees are highly
504 Documentation/core-api/assoc_array.rst
506 for more information.
516 config HAS_IOPORT_MAP
518 depends on HAS_IOMEM && !NO_IOPORT_MAP
521 source "kernel/dma/Kconfig"
530 config CHECK_SIGNATURE
533 config CPUMASK_OFFSTACK
534 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
536 Use dynamic allocation for cpumask_var_t, instead of putting
537 them on the stack. This is a bit more expensive, but avoids
541 bool "Set number of CPUs at compile time"
542 depends on SMP && EXPERT && !COMPILE_TEST
544 Say Yes if you have NR_CPUS set to an actual number of possible
545 CPUs in your system, not to a default value. This forces the core
546 code to rely on compile-time value and optimize kernel routines
558 # This actually supports modular compilation, but the module overhead
559 # is ridiculous for the amount of code involved. Until an out-of-tree
560 # driver asks for it, we'll just link it directly it into the kernel
561 # when required. Since we're ignoring out-of-tree users, there's also
562 # no need bother prompting for a manual decision:
563 # prompt "glob_match() function"
565 This option provides a glob_match function for performing
566 simple text pattern matching. It originated in the ATA code
567 to blacklist particular drive models, but other device drivers
568 may need similar functionality.
570 All drivers in the Linux kernel tree that require this function
571 should automatically select this option. Say N unless you
572 are compiling an out-of tree driver which tells you that it
576 tristate "glob self-test on init"
579 This option enables a simple self-test of the glob_match
580 function on startup. It is primarily useful for people
581 working on the code to ensure they haven't introduced any
584 It only adds a little bit of code and slows kernel boot (or
585 module load) by a small amount, so you're welcome to play with
586 it, but you probably don't need it.
589 # Netlink attribute parsing support is select'ed if needed
595 # Generic 64-bit atomic support is selected if needed
597 config GENERIC_ATOMIC64
607 bool "IRQ polling library"
609 Helper library to poll interrupt mitigation using polling.
615 Multiprecision maths library from GnuPG.
616 It is used to implement RSA digital signature verification,
617 which is used by IMA/EVM digital signature extension.
626 Digital signature verification. Currently only RSA is supported.
627 Implementation is done using GnuPG MPI library
632 Dynamic Interrupt Moderation library.
633 Implements an algorithm for dynamically changing CQ moderation values
634 according to run time performance.
637 # libfdt files, only selected if needed.
645 Enable fast lookup object identifier registry.
653 source "lib/vdso/Kconfig"
655 source "lib/fonts/Kconfig"
660 Provides a helper to split scatterlists into chunks, each chunk being
661 a scatterlist. This should be selected by a driver or an API which
662 whishes to split a scatterlist amongst multiple DMA channels.
667 Provides a helper to allocate chained scatterlists. This should be
668 selected by a driver or an API which whishes to allocate chained
675 config ARCH_NO_SG_CHAIN
678 config ARCH_HAS_PMEM_API
684 config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
687 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
690 # use memcpy to implement user copies for nommu architectures
691 config UACCESS_MEMCPY
694 config ARCH_HAS_UACCESS_FLUSHCACHE
697 # arch has a concept of a recoverable synchronous exception due to a
698 # memory-read error like x86 machine-check or ARM data-abort, and
699 # implements copy_mc_to_{user,kernel} to abort and report
700 # 'bytes-transferred' if that exception fires when accessing the source
702 config ARCH_HAS_COPY_MC
705 # Temporary. Goes away when all archs are cleaned up
706 config ARCH_STACKWALK
713 config STACKDEPOT_ALWAYS_INIT
719 depends on STACKTRACE_SUPPORT
726 tristate "parman" if COMPILE_TEST
729 tristate "objagg" if COMPILE_TEST
733 config GENERIC_IOREMAP
736 config GENERIC_LIB_ASHLDI3
739 config GENERIC_LIB_ASHRDI3
742 config GENERIC_LIB_LSHRDI3
745 config GENERIC_LIB_MULDI3
748 config GENERIC_LIB_CMPDI2
751 config GENERIC_LIB_UCMPDI2
754 config GENERIC_LIB_DEVMEM_IS_ALLOWED