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 config TRACE_MMIO_ACCESS
122 bool "Register read/write tracing"
123 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS
125 Create tracepoints for MMIO read/write operations. These trace events
126 can be used for logging all MMIO read/write operations.
128 source "lib/crypto/Kconfig"
131 tristate "CRC-CCITT functions"
133 This option is provided for the case where no in-kernel-tree
134 modules require CRC-CCITT functions, but a module built outside
135 the kernel tree does. Such modules that use library CRC-CCITT
136 functions require M here.
139 tristate "CRC16 functions"
141 This option is provided for the case where no in-kernel-tree
142 modules require CRC16 functions, but a module built outside
143 the kernel tree does. Such modules that use library CRC16
144 functions require M here.
147 tristate "CRC calculation for the T10 Data Integrity Field"
149 select CRYPTO_CRCT10DIF
151 This option is only needed if a module that's not in the
152 kernel tree needs to calculate CRC checks for use with the
153 SCSI data integrity subsystem.
155 config CRC64_ROCKSOFT
156 tristate "CRC calculation for the Rocksoft model CRC64"
159 select CRYPTO_CRC64_ROCKSOFT
161 This option provides a CRC64 API to a registered crypto driver.
162 This is used with the block layer's data integrity subsystem.
165 tristate "CRC ITU-T V.41 functions"
167 This option is provided for the case where no in-kernel-tree
168 modules require CRC ITU-T V.41 functions, but a module built outside
169 the kernel tree does. Such modules that use library CRC ITU-T V.41
170 functions require M here.
173 tristate "CRC32/CRC32c functions"
177 This option is provided for the case where no in-kernel-tree
178 modules require CRC32/CRC32c functions, but a module built outside
179 the kernel tree does. Such modules that use library CRC32/CRC32c
180 functions require M here.
182 config CRC32_SELFTEST
183 tristate "CRC32 perform self test on init"
186 This option enables the CRC32 library functions to perform a
187 self test on initialization. The self test computes crc32_le
188 and crc32_be over byte strings with random alignment and length
189 and computes the total elapsed time and number of bytes processed.
192 prompt "CRC32 implementation"
194 default CRC32_SLICEBY8
196 This option allows a kernel builder to override the default choice
197 of CRC32 algorithm. Choose the default ("slice by 8") unless you
198 know that you need one of the others.
200 config CRC32_SLICEBY8
201 bool "Slice by 8 bytes"
203 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
204 This is the fastest algorithm, but comes with a 8KiB lookup table.
205 Most modern processors have enough cache to hold this table without
208 This is the default implementation choice. Choose this one unless
209 you have a good reason not to.
211 config CRC32_SLICEBY4
212 bool "Slice by 4 bytes"
214 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
215 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
218 Only choose this option if you know what you are doing.
221 bool "Sarwate's Algorithm (one byte at a time)"
223 Calculate checksum a byte at a time using Sarwate's algorithm. This
224 is not particularly fast, but has a small 256 byte lookup table.
226 Only choose this option if you know what you are doing.
229 bool "Classic Algorithm (one bit at a time)"
231 Calculate checksum one bit at a time. This is VERY slow, but has
232 no lookup table. This is provided as a debugging option.
234 Only choose this option if you are debugging crc32.
239 tristate "CRC64 functions"
241 This option is provided for the case where no in-kernel-tree
242 modules require CRC64 functions, but a module built outside
243 the kernel tree does. Such modules that use library CRC64
244 functions require M here.
247 tristate "CRC4 functions"
249 This option is provided for the case where no in-kernel-tree
250 modules require CRC4 functions, but a module built outside
251 the kernel tree does. Such modules that use library CRC4
252 functions require M here.
255 tristate "CRC7 functions"
257 This option is provided for the case where no in-kernel-tree
258 modules require CRC7 functions, but a module built outside
259 the kernel tree does. Such modules that use library CRC7
260 functions require M here.
263 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
267 This option is provided for the case where no in-kernel-tree
268 modules require CRC32c functions, but a module built outside the
269 kernel tree does. Such modules that use library CRC32c functions
270 require M here. See Castagnoli93.
271 Module will be libcrc32c.
274 tristate "CRC8 function"
276 This option provides CRC8 function. Drivers may select this
277 when they need to do cyclic redundancy check according CRC8
278 algorithm. Module will be called crc8.
285 depends on AUDIT && !AUDIT_ARCH
288 config AUDIT_ARCH_COMPAT_GENERIC
292 config AUDIT_COMPAT_GENERIC
294 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
297 config RANDOM32_SELFTEST
298 bool "PRNG perform self test on init"
300 This option enables the 32 bit PRNG library functions to perform a
301 self test on initialization.
304 # compression support is select'ed if needed
310 config 842_DECOMPRESS
324 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
326 Enable s390x hardware support for zlib in the kernel.
331 config LZO_DECOMPRESS
337 config LZ4HC_COMPRESS
340 config LZ4_DECOMPRESS
351 config ZSTD_DECOMPRESS
355 source "lib/xz/Kconfig"
358 # These all provide a common interface (hence the apparent duplication with
359 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
361 config DECOMPRESS_GZIP
365 config DECOMPRESS_BZIP2
368 config DECOMPRESS_LZMA
375 config DECOMPRESS_LZO
376 select LZO_DECOMPRESS
379 config DECOMPRESS_LZ4
380 select LZ4_DECOMPRESS
383 config DECOMPRESS_ZSTD
384 select ZSTD_DECOMPRESS
388 # Generic allocator support is selected if needed
390 config GENERIC_ALLOCATOR
394 # reed solomon support is select'ed if needed
399 config REED_SOLOMON_ENC8
402 config REED_SOLOMON_DEC8
405 config REED_SOLOMON_ENC16
408 config REED_SOLOMON_DEC16
412 # 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.
485 Support entries which occupy multiple consecutive indices in the
488 config ASSOCIATIVE_ARRAY
491 Generic associative array. Can be searched and iterated over whilst
492 it is being modified. It is also reasonably quick to search and
493 modify. The algorithms are non-recursive, and the trees are highly
498 Documentation/core-api/assoc_array.rst
500 for more information.
507 config HAS_IOPORT_MAP
509 depends on HAS_IOMEM && !NO_IOPORT_MAP
512 source "kernel/dma/Kconfig"
521 config CHECK_SIGNATURE
524 config CPUMASK_OFFSTACK
525 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
527 Use dynamic allocation for cpumask_var_t, instead of putting
528 them on the stack. This is a bit more expensive, but avoids
532 bool "NR_CPUS is set to an actual number of CPUs"
535 Say Yes if you have NR_CPUS set to an actual number of possible
536 CPUs in your system, not to a default value. This forces the core
537 code to rely on compile-time value and optimize kernel routines
549 # This actually supports modular compilation, but the module overhead
550 # is ridiculous for the amount of code involved. Until an out-of-tree
551 # driver asks for it, we'll just link it directly it into the kernel
552 # when required. Since we're ignoring out-of-tree users, there's also
553 # no need bother prompting for a manual decision:
554 # prompt "glob_match() function"
556 This option provides a glob_match function for performing
557 simple text pattern matching. It originated in the ATA code
558 to blacklist particular drive models, but other device drivers
559 may need similar functionality.
561 All drivers in the Linux kernel tree that require this function
562 should automatically select this option. Say N unless you
563 are compiling an out-of tree driver which tells you that it
567 tristate "glob self-test on init"
570 This option enables a simple self-test of the glob_match
571 function on startup. It is primarily useful for people
572 working on the code to ensure they haven't introduced any
575 It only adds a little bit of code and slows kernel boot (or
576 module load) by a small amount, so you're welcome to play with
577 it, but you probably don't need it.
580 # Netlink attribute parsing support is select'ed if needed
586 # Generic 64-bit atomic support is selected if needed
588 config GENERIC_ATOMIC64
598 bool "IRQ polling library"
600 Helper library to poll interrupt mitigation using polling.
606 Multiprecision maths library from GnuPG.
607 It is used to implement RSA digital signature verification,
608 which is used by IMA/EVM digital signature extension.
617 Digital signature verification. Currently only RSA is supported.
618 Implementation is done using GnuPG MPI library
623 Dynamic Interrupt Moderation library.
624 Implements an algorithm for dynamically changing CQ moderation values
625 according to run time performance.
628 # libfdt files, only selected if needed.
636 Enable fast lookup object identifier registry.
644 source "lib/vdso/Kconfig"
646 source "lib/fonts/Kconfig"
651 Provides a helper to split scatterlists into chunks, each chunk being
652 a scatterlist. This should be selected by a driver or an API which
653 whishes to split a scatterlist amongst multiple DMA channels.
658 Provides a helper to allocate chained scatterlists. This should be
659 selected by a driver or an API which whishes to allocate chained
666 config ARCH_NO_SG_CHAIN
669 config ARCH_HAS_PMEM_API
675 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
678 # use memcpy to implement user copies for nommu architectures
679 config UACCESS_MEMCPY
682 config ARCH_HAS_UACCESS_FLUSHCACHE
685 # arch has a concept of a recoverable synchronous exception due to a
686 # memory-read error like x86 machine-check or ARM data-abort, and
687 # implements copy_mc_to_{user,kernel} to abort and report
688 # 'bytes-transferred' if that exception fires when accessing the source
690 config ARCH_HAS_COPY_MC
693 # Temporary. Goes away when all archs are cleaned up
694 config ARCH_STACKWALK
701 config STACKDEPOT_ALWAYS_INIT
707 depends on STACKTRACE_SUPPORT
714 tristate "parman" if COMPILE_TEST
717 tristate "objagg" if COMPILE_TEST
721 config GENERIC_IOREMAP
724 config GENERIC_LIB_ASHLDI3
727 config GENERIC_LIB_ASHRDI3
730 config GENERIC_LIB_LSHRDI3
733 config GENERIC_LIB_MULDI3
736 config GENERIC_LIB_CMPDI2
739 config GENERIC_LIB_UCMPDI2
742 config GENERIC_LIB_DEVMEM_IS_ALLOWED