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.
43 config PACKING_KUNIT_TEST
44 tristate "KUnit tests for packing library" if !KUNIT_ALL_TESTS
45 depends on PACKING && KUNIT
46 default KUNIT_ALL_TESTS
48 This builds KUnit tests for the packing library.
50 For more information on KUnit and unit tests in general,
51 please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
58 config HAVE_ARCH_BITREVERSE
62 This option enables the use of hardware bit-reversal instructions on
63 architectures which support such operations.
65 config ARCH_HAS_STRNCPY_FROM_USER
68 config ARCH_HAS_STRNLEN_USER
71 config GENERIC_STRNCPY_FROM_USER
72 def_bool !ARCH_HAS_STRNCPY_FROM_USER
74 config GENERIC_STRNLEN_USER
75 def_bool !ARCH_HAS_STRNLEN_USER
77 config GENERIC_NET_UTILS
80 source "lib/math/Kconfig"
82 config NO_GENERIC_PCI_IOPORT_MAP
87 select GENERIC_PCI_IOMAP
92 config ARCH_USE_CMPXCHG_LOCKREF
95 config ARCH_HAS_FAST_MULTIPLIER
98 config ARCH_USE_SYM_ANNOTATIONS
102 bool "Access I/O in non-MMIO mode"
104 depends on HAS_IOPORT
106 On some platforms where no separate I/O space exists, there are I/O
107 hosts which can not be accessed in MMIO mode. Using the logical PIO
108 mechanism, the host-local I/O resource can be mapped into system
109 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
110 system can access the I/O devices with the mapped-logic PIO through
113 This way has relatively little I/O performance cost. Please make
114 sure your devices really need this configure item enabled.
116 When in doubt, say N.
118 config INDIRECT_IOMEM
121 This is selected by other options/architectures to provide the
122 emulated iomem accessors.
124 config INDIRECT_IOMEM_FALLBACK
126 depends on INDIRECT_IOMEM
128 If INDIRECT_IOMEM is selected, this enables falling back to plain
129 mmio accesses when the IO memory address is not a registered
132 config TRACE_MMIO_ACCESS
133 bool "Register read/write tracing"
134 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS
136 Create tracepoints for MMIO read/write operations. These trace events
137 can be used for logging all MMIO read/write operations.
139 source "lib/crypto/Kconfig"
142 tristate "CRC-CCITT functions"
144 This option is provided for the case where no in-kernel-tree
145 modules require CRC-CCITT functions, but a module built outside
146 the kernel tree does. Such modules that use library CRC-CCITT
147 functions require M here.
150 tristate "CRC16 functions"
152 This option is provided for the case where no in-kernel-tree
153 modules require CRC16 functions, but a module built outside
154 the kernel tree does. Such modules that use library CRC16
155 functions require M here.
158 tristate "CRC calculation for the T10 Data Integrity Field"
160 This option is only needed if a module that's not in the
161 kernel tree needs to calculate CRC checks for use with the
162 SCSI data integrity subsystem.
164 config ARCH_HAS_CRC_T10DIF
167 config CRC_T10DIF_ARCH
169 default CRC_T10DIF if ARCH_HAS_CRC_T10DIF && CRC_OPTIMIZATIONS
171 config CRC64_ROCKSOFT
172 tristate "CRC calculation for the Rocksoft model CRC64"
175 select CRYPTO_CRC64_ROCKSOFT
177 This option provides a CRC64 API to a registered crypto driver.
178 This is used with the block layer's data integrity subsystem.
181 tristate "CRC ITU-T V.41 functions"
183 This option is provided for the case where no in-kernel-tree
184 modules require CRC ITU-T V.41 functions, but a module built outside
185 the kernel tree does. Such modules that use library CRC ITU-T V.41
186 functions require M here.
189 tristate "CRC32/CRC32c functions"
193 This option is provided for the case where no in-kernel-tree
194 modules require CRC32/CRC32c functions, but a module built outside
195 the kernel tree does. Such modules that use library CRC32/CRC32c
196 functions require M here.
198 config ARCH_HAS_CRC32
203 default CRC32 if ARCH_HAS_CRC32 && CRC_OPTIMIZATIONS
206 tristate "CRC64 functions"
208 This option is provided for the case where no in-kernel-tree
209 modules require CRC64 functions, but a module built outside
210 the kernel tree does. Such modules that use library CRC64
211 functions require M here.
214 tristate "CRC4 functions"
216 This option is provided for the case where no in-kernel-tree
217 modules require CRC4 functions, but a module built outside
218 the kernel tree does. Such modules that use library CRC4
219 functions require M here.
222 tristate "CRC7 functions"
224 This option is provided for the case where no in-kernel-tree
225 modules require CRC7 functions, but a module built outside
226 the kernel tree does. Such modules that use library CRC7
227 functions require M here.
230 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
233 This option just selects CRC32 and is provided for compatibility
234 purposes until the users are updated to select CRC32 directly.
237 tristate "CRC8 function"
239 This option provides CRC8 function. Drivers may select this
240 when they need to do cyclic redundancy check according CRC8
241 algorithm. Module will be called crc8.
243 config CRC_OPTIMIZATIONS
244 bool "Enable optimized CRC implementations" if EXPERT
247 Disabling this option reduces code size slightly by disabling the
248 architecture-optimized implementations of any CRC variants that are
249 enabled. CRC checksumming performance may get much slower.
251 Keep this enabled unless you're really trying to minimize the size of
259 depends on AUDIT && !AUDIT_ARCH
262 config AUDIT_ARCH_COMPAT_GENERIC
266 config AUDIT_COMPAT_GENERIC
268 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
271 config RANDOM32_SELFTEST
272 bool "PRNG perform self test on init"
274 This option enables the 32 bit PRNG library functions to perform a
275 self test on initialization.
278 # compression support is select'ed if needed
284 config 842_DECOMPRESS
298 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
300 Enable s390x hardware support for zlib in the kernel.
305 config LZO_DECOMPRESS
311 config LZ4HC_COMPRESS
314 config LZ4_DECOMPRESS
325 config ZSTD_DECOMPRESS
329 source "lib/xz/Kconfig"
332 # These all provide a common interface (hence the apparent duplication with
333 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
335 config DECOMPRESS_GZIP
339 config DECOMPRESS_BZIP2
342 config DECOMPRESS_LZMA
349 config DECOMPRESS_LZO
350 select LZO_DECOMPRESS
353 config DECOMPRESS_LZ4
354 select LZ4_DECOMPRESS
357 config DECOMPRESS_ZSTD
358 select ZSTD_DECOMPRESS
362 # Generic allocator support is selected if needed
364 config GENERIC_ALLOCATOR
368 # reed solomon support is select'ed if needed
373 config REED_SOLOMON_ENC8
376 config REED_SOLOMON_DEC8
379 config REED_SOLOMON_ENC16
382 config REED_SOLOMON_DEC16
386 # BCH support is selected if needed
392 config BCH_CONST_PARAMS
395 Drivers may select this option to force specific constant
396 values for parameters 'm' (Galois field order) and 't'
397 (error correction capability). Those specific values must
398 be set by declaring default values for symbols BCH_CONST_M
400 Doing so will enable extra compiler optimizations,
401 improving encoding and decoding performance up to 2x for
402 usual (m,t) values (typically such that m*t < 200).
403 When this option is selected, the BCH library supports
404 only a single (m,t) configuration. This is mainly useful
405 for NAND flash board drivers requiring known, fixed BCH
412 Constant value for Galois field order 'm'. If 'k' is the
413 number of data bits to protect, 'm' should be chosen such
414 that (k + m*t) <= 2**m - 1.
415 Drivers should declare a default value for this symbol if
416 they select option BCH_CONST_PARAMS.
421 Constant value for error correction capability in bits 't'.
422 Drivers should declare a default value for this symbol if
423 they select option BCH_CONST_PARAMS.
426 # Textsearch support is select'ed if needed
431 config TEXTSEARCH_KMP
437 config TEXTSEARCH_FSM
446 Simple, embeddable, interval-tree. Can find the start of an
447 overlapping range in log(n) time and then iterate over all
448 overlapping nodes. The algorithm is implemented as an
453 Documentation/core-api/rbtree.rst
455 for more information.
457 config INTERVAL_TREE_SPAN_ITER
459 depends on INTERVAL_TREE
464 Support entries which occupy multiple consecutive indices in the
467 config ASSOCIATIVE_ARRAY
470 Generic associative array. Can be searched and iterated over whilst
471 it is being modified. It is also reasonably quick to search and
472 modify. The algorithms are non-recursive, and the trees are highly
477 Documentation/core-api/assoc_array.rst
479 for more information.
492 config HAS_IOPORT_MAP
494 depends on HAS_IOMEM && !NO_IOPORT_MAP
497 source "kernel/dma/Kconfig"
506 config CHECK_SIGNATURE
509 config CPUMASK_OFFSTACK
510 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
512 Use dynamic allocation for cpumask_var_t, instead of putting
513 them on the stack. This is a bit more expensive, but avoids
528 # This actually supports modular compilation, but the module overhead
529 # is ridiculous for the amount of code involved. Until an out-of-tree
530 # driver asks for it, we'll just link it directly it into the kernel
531 # when required. Since we're ignoring out-of-tree users, there's also
532 # no need bother prompting for a manual decision:
533 # prompt "glob_match() function"
535 This option provides a glob_match function for performing
536 simple text pattern matching. It originated in the ATA code
537 to blacklist particular drive models, but other device drivers
538 may need similar functionality.
540 All drivers in the Linux kernel tree that require this function
541 should automatically select this option. Say N unless you
542 are compiling an out-of tree driver which tells you that it
546 tristate "glob self-test on init"
549 This option enables a simple self-test of the glob_match
550 function on startup. It is primarily useful for people
551 working on the code to ensure they haven't introduced any
554 It only adds a little bit of code and slows kernel boot (or
555 module load) by a small amount, so you're welcome to play with
556 it, but you probably don't need it.
559 # Netlink attribute parsing support is select'ed if needed
565 # Generic 64-bit atomic support is selected if needed
567 config GENERIC_ATOMIC64
577 bool "IRQ polling library"
579 Helper library to poll interrupt mitigation using polling.
585 Multiprecision maths library from GnuPG.
586 It is used to implement RSA digital signature verification,
587 which is used by IMA/EVM digital signature extension.
596 Digital signature verification. Currently only RSA is supported.
597 Implementation is done using GnuPG MPI library
603 Dynamic Interrupt Moderation library.
604 Implements an algorithm for dynamically changing CQ moderation values
605 according to run time performance.
608 # libfdt files, only selected if needed.
616 Enable fast lookup object identifier registry.
624 source "lib/vdso/Kconfig"
626 source "lib/fonts/Kconfig"
631 Provides a helper to split scatterlists into chunks, each chunk being
632 a scatterlist. This should be selected by a driver or an API which
633 whishes to split a scatterlist amongst multiple DMA channels.
638 Provides a helper to allocate chained scatterlists. This should be
639 selected by a driver or an API which whishes to allocate chained
646 config ARCH_NO_SG_CHAIN
649 config ARCH_HAS_PMEM_API
655 config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
658 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
661 # use memcpy to implement user copies for nommu architectures
662 config UACCESS_MEMCPY
665 config ARCH_HAS_UACCESS_FLUSHCACHE
668 # arch has a concept of a recoverable synchronous exception due to a
669 # memory-read error like x86 machine-check or ARM data-abort, and
670 # implements copy_mc_to_{user,kernel} to abort and report
671 # 'bytes-transferred' if that exception fires when accessing the source
673 config ARCH_HAS_COPY_MC
676 # Temporary. Goes away when all archs are cleaned up
677 config ARCH_STACKWALK
684 Stack depot: stack trace storage that avoids duplication
686 config STACKDEPOT_ALWAYS_INIT
690 Always initialize stack depot during early boot
692 config STACKDEPOT_MAX_FRAMES
693 int "Maximum number of frames in trace saved in stack depot"
696 depends on STACKDEPOT
700 depends on STACKTRACE_SUPPORT
707 tristate "parman" if COMPILE_TEST
710 tristate "objagg" if COMPILE_TEST
713 bool "Boot-time test for lwq queuing"
715 Run boot-time test of light-weight queuing.
719 config GENERIC_IOREMAP
722 config GENERIC_LIB_ASHLDI3
725 config GENERIC_LIB_ASHRDI3
728 config GENERIC_LIB_LSHRDI3
731 config GENERIC_LIB_MULDI3
734 config GENERIC_LIB_CMPDI2
737 config GENERIC_LIB_UCMPDI2
740 config GENERIC_LIB_DEVMEM_IS_ALLOWED
753 config FIRMWARE_TABLE