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
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"
94 On some platforms where no separate I/O space exists, there are I/O
95 hosts which can not be accessed in MMIO mode. Using the logical PIO
96 mechanism, the host-local I/O resource can be mapped into system
97 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
98 system can access the I/O devices with the mapped-logic PIO through
101 This way has relatively little I/O performance cost. Please make
102 sure your devices really need this configure item enabled.
104 When in doubt, say N.
106 config INDIRECT_IOMEM
109 This is selected by other options/architectures to provide the
110 emulated iomem accessors.
112 config INDIRECT_IOMEM_FALLBACK
114 depends on INDIRECT_IOMEM
116 If INDIRECT_IOMEM is selected, this enables falling back to plain
117 mmio accesses when the IO memory address is not a registered
120 config TRACE_MMIO_ACCESS
121 bool "Register read/write tracing"
122 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS
124 Create tracepoints for MMIO read/write operations. These trace events
125 can be used for logging all MMIO read/write operations.
127 source "lib/crypto/Kconfig"
130 tristate "CRC-CCITT functions"
132 This option is provided for the case where no in-kernel-tree
133 modules require CRC-CCITT functions, but a module built outside
134 the kernel tree does. Such modules that use library CRC-CCITT
135 functions require M here.
138 tristate "CRC16 functions"
140 This option is provided for the case where no in-kernel-tree
141 modules require CRC16 functions, but a module built outside
142 the kernel tree does. Such modules that use library CRC16
143 functions require M here.
146 tristate "CRC calculation for the T10 Data Integrity Field"
148 select CRYPTO_CRCT10DIF
150 This option is only needed if a module that's not in the
151 kernel tree needs to calculate CRC checks for use with the
152 SCSI data integrity subsystem.
154 config CRC64_ROCKSOFT
155 tristate "CRC calculation for the Rocksoft model CRC64"
158 select CRYPTO_CRC64_ROCKSOFT
160 This option provides a CRC64 API to a registered crypto driver.
161 This is used with the block layer's data integrity subsystem.
164 tristate "CRC ITU-T V.41 functions"
166 This option is provided for the case where no in-kernel-tree
167 modules require CRC ITU-T V.41 functions, but a module built outside
168 the kernel tree does. Such modules that use library CRC ITU-T V.41
169 functions require M here.
172 tristate "CRC32/CRC32c functions"
176 This option is provided for the case where no in-kernel-tree
177 modules require CRC32/CRC32c functions, but a module built outside
178 the kernel tree does. Such modules that use library CRC32/CRC32c
179 functions require M here.
181 config CRC32_SELFTEST
182 tristate "CRC32 perform self test on init"
185 This option enables the CRC32 library functions to perform a
186 self test on initialization. The self test computes crc32_le
187 and crc32_be over byte strings with random alignment and length
188 and computes the total elapsed time and number of bytes processed.
191 prompt "CRC32 implementation"
193 default CRC32_SLICEBY8
195 This option allows a kernel builder to override the default choice
196 of CRC32 algorithm. Choose the default ("slice by 8") unless you
197 know that you need one of the others.
199 config CRC32_SLICEBY8
200 bool "Slice by 8 bytes"
202 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
203 This is the fastest algorithm, but comes with a 8KiB lookup table.
204 Most modern processors have enough cache to hold this table without
207 This is the default implementation choice. Choose this one unless
208 you have a good reason not to.
210 config CRC32_SLICEBY4
211 bool "Slice by 4 bytes"
213 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
214 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
217 Only choose this option if you know what you are doing.
220 bool "Sarwate's Algorithm (one byte at a time)"
222 Calculate checksum a byte at a time using Sarwate's algorithm. This
223 is not particularly fast, but has a small 256 byte lookup table.
225 Only choose this option if you know what you are doing.
228 bool "Classic Algorithm (one bit at a time)"
230 Calculate checksum one bit at a time. This is VERY slow, but has
231 no lookup table. This is provided as a debugging option.
233 Only choose this option if you are debugging crc32.
238 tristate "CRC64 functions"
240 This option is provided for the case where no in-kernel-tree
241 modules require CRC64 functions, but a module built outside
242 the kernel tree does. Such modules that use library CRC64
243 functions require M here.
246 tristate "CRC4 functions"
248 This option is provided for the case where no in-kernel-tree
249 modules require CRC4 functions, but a module built outside
250 the kernel tree does. Such modules that use library CRC4
251 functions require M here.
254 tristate "CRC7 functions"
256 This option is provided for the case where no in-kernel-tree
257 modules require CRC7 functions, but a module built outside
258 the kernel tree does. Such modules that use library CRC7
259 functions require M here.
262 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
266 This option is provided for the case where no in-kernel-tree
267 modules require CRC32c functions, but a module built outside the
268 kernel tree does. Such modules that use library CRC32c functions
269 require M here. See Castagnoli93.
270 Module will be libcrc32c.
273 tristate "CRC8 function"
275 This option provides CRC8 function. Drivers may select this
276 when they need to do cyclic redundancy check according CRC8
277 algorithm. Module will be called crc8.
284 depends on AUDIT && !AUDIT_ARCH
287 config AUDIT_ARCH_COMPAT_GENERIC
291 config AUDIT_COMPAT_GENERIC
293 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
296 config RANDOM32_SELFTEST
297 bool "PRNG perform self test on init"
299 This option enables the 32 bit PRNG library functions to perform a
300 self test on initialization.
303 # compression support is select'ed if needed
309 config 842_DECOMPRESS
323 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
325 Enable s390x hardware support for zlib in the kernel.
330 config LZO_DECOMPRESS
336 config LZ4HC_COMPRESS
339 config LZ4_DECOMPRESS
350 config ZSTD_DECOMPRESS
354 source "lib/xz/Kconfig"
357 # These all provide a common interface (hence the apparent duplication with
358 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
360 config DECOMPRESS_GZIP
364 config DECOMPRESS_BZIP2
367 config DECOMPRESS_LZMA
374 config DECOMPRESS_LZO
375 select LZO_DECOMPRESS
378 config DECOMPRESS_LZ4
379 select LZ4_DECOMPRESS
382 config DECOMPRESS_ZSTD
383 select ZSTD_DECOMPRESS
387 # Generic allocator support is selected if needed
389 config GENERIC_ALLOCATOR
393 # reed solomon support is select'ed if needed
398 config REED_SOLOMON_ENC8
401 config REED_SOLOMON_DEC8
404 config REED_SOLOMON_ENC16
407 config REED_SOLOMON_DEC16
411 # BCH support is selected if needed
417 config BCH_CONST_PARAMS
420 Drivers may select this option to force specific constant
421 values for parameters 'm' (Galois field order) and 't'
422 (error correction capability). Those specific values must
423 be set by declaring default values for symbols BCH_CONST_M
425 Doing so will enable extra compiler optimizations,
426 improving encoding and decoding performance up to 2x for
427 usual (m,t) values (typically such that m*t < 200).
428 When this option is selected, the BCH library supports
429 only a single (m,t) configuration. This is mainly useful
430 for NAND flash board drivers requiring known, fixed BCH
437 Constant value for Galois field order 'm'. If 'k' is the
438 number of data bits to protect, 'm' should be chosen such
439 that (k + m*t) <= 2**m - 1.
440 Drivers should declare a default value for this symbol if
441 they select option BCH_CONST_PARAMS.
446 Constant value for error correction capability in bits 't'.
447 Drivers should declare a default value for this symbol if
448 they select option BCH_CONST_PARAMS.
451 # Textsearch support is select'ed if needed
456 config TEXTSEARCH_KMP
462 config TEXTSEARCH_FSM
471 Simple, embeddable, interval-tree. Can find the start of an
472 overlapping range in log(n) time and then iterate over all
473 overlapping nodes. The algorithm is implemented as an
478 Documentation/core-api/rbtree.rst
480 for more information.
482 config INTERVAL_TREE_SPAN_ITER
484 depends on INTERVAL_TREE
489 Support entries which occupy multiple consecutive indices in the
492 config ASSOCIATIVE_ARRAY
495 Generic associative array. Can be searched and iterated over whilst
496 it is being modified. It is also reasonably quick to search and
497 modify. The algorithms are non-recursive, and the trees are highly
502 Documentation/core-api/assoc_array.rst
504 for more information.
517 config HAS_IOPORT_MAP
519 depends on HAS_IOMEM && !NO_IOPORT_MAP
522 source "kernel/dma/Kconfig"
531 config CHECK_SIGNATURE
534 config CPUMASK_OFFSTACK
535 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
537 Use dynamic allocation for cpumask_var_t, instead of putting
538 them on the stack. This is a bit more expensive, but avoids
542 bool "Set number of CPUs at compile time"
543 depends on SMP && EXPERT && !COMPILE_TEST
545 Say Yes if you have NR_CPUS set to an actual number of possible
546 CPUs in your system, not to a default value. This forces the core
547 code to rely on compile-time value and optimize kernel routines
559 # This actually supports modular compilation, but the module overhead
560 # is ridiculous for the amount of code involved. Until an out-of-tree
561 # driver asks for it, we'll just link it directly it into the kernel
562 # when required. Since we're ignoring out-of-tree users, there's also
563 # no need bother prompting for a manual decision:
564 # prompt "glob_match() function"
566 This option provides a glob_match function for performing
567 simple text pattern matching. It originated in the ATA code
568 to blacklist particular drive models, but other device drivers
569 may need similar functionality.
571 All drivers in the Linux kernel tree that require this function
572 should automatically select this option. Say N unless you
573 are compiling an out-of tree driver which tells you that it
577 tristate "glob self-test on init"
580 This option enables a simple self-test of the glob_match
581 function on startup. It is primarily useful for people
582 working on the code to ensure they haven't introduced any
585 It only adds a little bit of code and slows kernel boot (or
586 module load) by a small amount, so you're welcome to play with
587 it, but you probably don't need it.
590 # Netlink attribute parsing support is select'ed if needed
596 # Generic 64-bit atomic support is selected if needed
598 config GENERIC_ATOMIC64
608 bool "IRQ polling library"
610 Helper library to poll interrupt mitigation using polling.
616 Multiprecision maths library from GnuPG.
617 It is used to implement RSA digital signature verification,
618 which is used by IMA/EVM digital signature extension.
627 Digital signature verification. Currently only RSA is supported.
628 Implementation is done using GnuPG MPI library
633 Dynamic Interrupt Moderation library.
634 Implements an algorithm for dynamically changing CQ moderation values
635 according to run time performance.
638 # libfdt files, only selected if needed.
646 Enable fast lookup object identifier registry.
654 source "lib/vdso/Kconfig"
656 source "lib/fonts/Kconfig"
661 Provides a helper to split scatterlists into chunks, each chunk being
662 a scatterlist. This should be selected by a driver or an API which
663 whishes to split a scatterlist amongst multiple DMA channels.
668 Provides a helper to allocate chained scatterlists. This should be
669 selected by a driver or an API which whishes to allocate chained
676 config ARCH_NO_SG_CHAIN
679 config ARCH_HAS_PMEM_API
685 config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
688 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
691 # use memcpy to implement user copies for nommu architectures
692 config UACCESS_MEMCPY
695 config ARCH_HAS_UACCESS_FLUSHCACHE
698 # arch has a concept of a recoverable synchronous exception due to a
699 # memory-read error like x86 machine-check or ARM data-abort, and
700 # implements copy_mc_to_{user,kernel} to abort and report
701 # 'bytes-transferred' if that exception fires when accessing the source
703 config ARCH_HAS_COPY_MC
706 # Temporary. Goes away when all archs are cleaned up
707 config ARCH_STACKWALK
714 Stack depot: stack trace storage that avoids duplication
716 config STACKDEPOT_ALWAYS_INIT
720 Always initialize stack depot during early boot
722 config STACKDEPOT_MAX_FRAMES
723 int "Maximum number of frames in trace saved in stack depot"
726 depends on STACKDEPOT
730 depends on STACKTRACE_SUPPORT
737 tristate "parman" if COMPILE_TEST
740 tristate "objagg" if COMPILE_TEST
743 bool "Boot-time test for lwq queuing"
745 Run boot-time test of light-weight queuing.
749 config GENERIC_IOREMAP
752 config GENERIC_LIB_ASHLDI3
755 config GENERIC_LIB_ASHRDI3
758 config GENERIC_LIB_LSHRDI3
761 config GENERIC_LIB_MULDI3
764 config GENERIC_LIB_CMPDI2
767 config GENERIC_LIB_UCMPDI2
770 config GENERIC_LIB_DEVMEM_IS_ALLOWED
783 config FIRMWARE_TABLE