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
420 config BCH_CONST_PARAMS
423 Drivers may select this option to force specific constant
424 values for parameters 'm' (Galois field order) and 't'
425 (error correction capability). Those specific values must
426 be set by declaring default values for symbols BCH_CONST_M
428 Doing so will enable extra compiler optimizations,
429 improving encoding and decoding performance up to 2x for
430 usual (m,t) values (typically such that m*t < 200).
431 When this option is selected, the BCH library supports
432 only a single (m,t) configuration. This is mainly useful
433 for NAND flash board drivers requiring known, fixed BCH
440 Constant value for Galois field order 'm'. If 'k' is the
441 number of data bits to protect, 'm' should be chosen such
442 that (k + m*t) <= 2**m - 1.
443 Drivers should declare a default value for this symbol if
444 they select option BCH_CONST_PARAMS.
449 Constant value for error correction capability in bits 't'.
450 Drivers should declare a default value for this symbol if
451 they select option BCH_CONST_PARAMS.
454 # Textsearch support is select'ed if needed
459 config TEXTSEARCH_KMP
465 config TEXTSEARCH_FSM
474 Simple, embeddable, interval-tree. Can find the start of an
475 overlapping range in log(n) time and then iterate over all
476 overlapping nodes. The algorithm is implemented as an
481 Documentation/core-api/rbtree.rst
483 for more information.
485 config INTERVAL_TREE_SPAN_ITER
487 depends on INTERVAL_TREE
492 Support entries which occupy multiple consecutive indices in the
495 config ASSOCIATIVE_ARRAY
498 Generic associative array. Can be searched and iterated over whilst
499 it is being modified. It is also reasonably quick to search and
500 modify. The algorithms are non-recursive, and the trees are highly
505 Documentation/core-api/assoc_array.rst
507 for more information.
520 config HAS_IOPORT_MAP
522 depends on HAS_IOMEM && !NO_IOPORT_MAP
525 source "kernel/dma/Kconfig"
534 config CHECK_SIGNATURE
537 config CPUMASK_OFFSTACK
538 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
540 Use dynamic allocation for cpumask_var_t, instead of putting
541 them on the stack. This is a bit more expensive, but avoids
545 bool "Set number of CPUs at compile time"
546 depends on SMP && EXPERT && !COMPILE_TEST
548 Say Yes if you have NR_CPUS set to an actual number of possible
549 CPUs in your system, not to a default value. This forces the core
550 code to rely on compile-time value and optimize kernel routines
562 # This actually supports modular compilation, but the module overhead
563 # is ridiculous for the amount of code involved. Until an out-of-tree
564 # driver asks for it, we'll just link it directly it into the kernel
565 # when required. Since we're ignoring out-of-tree users, there's also
566 # no need bother prompting for a manual decision:
567 # prompt "glob_match() function"
569 This option provides a glob_match function for performing
570 simple text pattern matching. It originated in the ATA code
571 to blacklist particular drive models, but other device drivers
572 may need similar functionality.
574 All drivers in the Linux kernel tree that require this function
575 should automatically select this option. Say N unless you
576 are compiling an out-of tree driver which tells you that it
580 tristate "glob self-test on init"
583 This option enables a simple self-test of the glob_match
584 function on startup. It is primarily useful for people
585 working on the code to ensure they haven't introduced any
588 It only adds a little bit of code and slows kernel boot (or
589 module load) by a small amount, so you're welcome to play with
590 it, but you probably don't need it.
593 # Netlink attribute parsing support is select'ed if needed
599 # Generic 64-bit atomic support is selected if needed
601 config GENERIC_ATOMIC64
611 bool "IRQ polling library"
613 Helper library to poll interrupt mitigation using polling.
619 Multiprecision maths library from GnuPG.
620 It is used to implement RSA digital signature verification,
621 which is used by IMA/EVM digital signature extension.
630 Digital signature verification. Currently only RSA is supported.
631 Implementation is done using GnuPG MPI library
636 Dynamic Interrupt Moderation library.
637 Implements an algorithm for dynamically changing CQ moderation values
638 according to run time performance.
641 # libfdt files, only selected if needed.
649 Enable fast lookup object identifier registry.
657 source "lib/vdso/Kconfig"
659 source "lib/fonts/Kconfig"
664 Provides a helper to split scatterlists into chunks, each chunk being
665 a scatterlist. This should be selected by a driver or an API which
666 whishes to split a scatterlist amongst multiple DMA channels.
671 Provides a helper to allocate chained scatterlists. This should be
672 selected by a driver or an API which whishes to allocate chained
679 config ARCH_NO_SG_CHAIN
682 config ARCH_HAS_PMEM_API
688 config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
691 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
694 # use memcpy to implement user copies for nommu architectures
695 config UACCESS_MEMCPY
698 config ARCH_HAS_UACCESS_FLUSHCACHE
701 # arch has a concept of a recoverable synchronous exception due to a
702 # memory-read error like x86 machine-check or ARM data-abort, and
703 # implements copy_mc_to_{user,kernel} to abort and report
704 # 'bytes-transferred' if that exception fires when accessing the source
706 config ARCH_HAS_COPY_MC
709 # Temporary. Goes away when all archs are cleaned up
710 config ARCH_STACKWALK
717 Stack depot: stack trace storage that avoids duplication
719 config STACKDEPOT_ALWAYS_INIT
723 Always initialize stack depot during early boot
725 config STACKDEPOT_MAX_FRAMES
726 int "Maximum number of frames in trace saved in stack depot"
729 depends on STACKDEPOT
733 depends on STACKTRACE_SUPPORT
740 tristate "parman" if COMPILE_TEST
743 tristate "objagg" if COMPILE_TEST
746 bool "Boot-time test for lwq queuing"
748 Run boot-time test of light-weight queuing.
752 config GENERIC_IOREMAP
755 config GENERIC_LIB_ASHLDI3
758 config GENERIC_LIB_ASHRDI3
761 config GENERIC_LIB_LSHRDI3
764 config GENERIC_LIB_MULDI3
767 config GENERIC_LIB_CMPDI2
770 config GENERIC_LIB_UCMPDI2
773 config GENERIC_LIB_DEVMEM_IS_ALLOWED
786 config FIRMWARE_TABLE