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"
134 tristate "CRC-CCITT functions"
136 This option is provided for the case where no in-kernel-tree
137 modules require CRC-CCITT functions, but a module built outside
138 the kernel tree does. Such modules that use library CRC-CCITT
139 functions require M here.
142 tristate "CRC16 functions"
144 This option is provided for the case where no in-kernel-tree
145 modules require CRC16 functions, but a module built outside
146 the kernel tree does. Such modules that use library CRC16
147 functions require M here.
150 tristate "CRC calculation for the T10 Data Integrity Field"
152 select CRYPTO_CRCT10DIF
154 This option is only needed if a module that's not in the
155 kernel tree needs to calculate CRC checks for use with the
156 SCSI data integrity subsystem.
158 config CRC64_ROCKSOFT
159 tristate "CRC calculation for the Rocksoft model CRC64"
162 select CRYPTO_CRC64_ROCKSOFT
164 This option provides a CRC64 API to a registered crypto driver.
165 This is used with the block layer's data integrity subsystem.
168 tristate "CRC ITU-T V.41 functions"
170 This option is provided for the case where no in-kernel-tree
171 modules require CRC ITU-T V.41 functions, but a module built outside
172 the kernel tree does. Such modules that use library CRC ITU-T V.41
173 functions require M here.
176 tristate "CRC32/CRC32c functions"
180 This option is provided for the case where no in-kernel-tree
181 modules require CRC32/CRC32c functions, but a module built outside
182 the kernel tree does. Such modules that use library CRC32/CRC32c
183 functions require M here.
185 config CRC32_SELFTEST
186 tristate "CRC32 perform self test on init"
189 This option enables the CRC32 library functions to perform a
190 self test on initialization. The self test computes crc32_le
191 and crc32_be over byte strings with random alignment and length
192 and computes the total elapsed time and number of bytes processed.
195 prompt "CRC32 implementation"
197 default CRC32_SLICEBY8
199 This option allows a kernel builder to override the default choice
200 of CRC32 algorithm. Choose the default ("slice by 8") unless you
201 know that you need one of the others.
203 config CRC32_SLICEBY8
204 bool "Slice by 8 bytes"
206 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
207 This is the fastest algorithm, but comes with a 8KiB lookup table.
208 Most modern processors have enough cache to hold this table without
211 This is the default implementation choice. Choose this one unless
212 you have a good reason not to.
214 config CRC32_SLICEBY4
215 bool "Slice by 4 bytes"
217 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
218 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
221 Only choose this option if you know what you are doing.
224 bool "Sarwate's Algorithm (one byte at a time)"
226 Calculate checksum a byte at a time using Sarwate's algorithm. This
227 is not particularly fast, but has a small 256 byte lookup table.
229 Only choose this option if you know what you are doing.
232 bool "Classic Algorithm (one bit at a time)"
234 Calculate checksum one bit at a time. This is VERY slow, but has
235 no lookup table. This is provided as a debugging option.
237 Only choose this option if you are debugging crc32.
242 tristate "CRC64 functions"
244 This option is provided for the case where no in-kernel-tree
245 modules require CRC64 functions, but a module built outside
246 the kernel tree does. Such modules that use library CRC64
247 functions require M here.
250 tristate "CRC4 functions"
252 This option is provided for the case where no in-kernel-tree
253 modules require CRC4 functions, but a module built outside
254 the kernel tree does. Such modules that use library CRC4
255 functions require M here.
258 tristate "CRC7 functions"
260 This option is provided for the case where no in-kernel-tree
261 modules require CRC7 functions, but a module built outside
262 the kernel tree does. Such modules that use library CRC7
263 functions require M here.
266 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
270 This option is provided for the case where no in-kernel-tree
271 modules require CRC32c functions, but a module built outside the
272 kernel tree does. Such modules that use library CRC32c functions
273 require M here. See Castagnoli93.
274 Module will be libcrc32c.
277 tristate "CRC8 function"
279 This option provides CRC8 function. Drivers may select this
280 when they need to do cyclic redundancy check according CRC8
281 algorithm. Module will be called crc8.
288 depends on AUDIT && !AUDIT_ARCH
291 config AUDIT_ARCH_COMPAT_GENERIC
295 config AUDIT_COMPAT_GENERIC
297 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
300 config RANDOM32_SELFTEST
301 bool "PRNG perform self test on init"
303 This option enables the 32 bit PRNG library functions to perform a
304 self test on initialization.
307 # compression support is select'ed if needed
313 config 842_DECOMPRESS
327 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
329 Enable s390x hardware support for zlib in the kernel.
334 config LZO_DECOMPRESS
340 config LZ4HC_COMPRESS
343 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
416 config BCH_CONST_PARAMS
419 Drivers may select this option to force specific constant
420 values for parameters 'm' (Galois field order) and 't'
421 (error correction capability). Those specific values must
422 be set by declaring default values for symbols BCH_CONST_M
424 Doing so will enable extra compiler optimizations,
425 improving encoding and decoding performance up to 2x for
426 usual (m,t) values (typically such that m*t < 200).
427 When this option is selected, the BCH library supports
428 only a single (m,t) configuration. This is mainly useful
429 for NAND flash board drivers requiring known, fixed BCH
436 Constant value for Galois field order 'm'. If 'k' is the
437 number of data bits to protect, 'm' should be chosen such
438 that (k + m*t) <= 2**m - 1.
439 Drivers should declare a default value for this symbol if
440 they select option BCH_CONST_PARAMS.
445 Constant value for error correction capability in bits 't'.
446 Drivers should declare a default value for this symbol if
447 they select option BCH_CONST_PARAMS.
450 # Textsearch support is select'ed if needed
455 config TEXTSEARCH_KMP
461 config TEXTSEARCH_FSM
470 Simple, embeddable, interval-tree. Can find the start of an
471 overlapping range in log(n) time and then iterate over all
472 overlapping nodes. The algorithm is implemented as an
477 Documentation/core-api/rbtree.rst
479 for more information.
484 Support entries which occupy multiple consecutive indices in the
487 config ASSOCIATIVE_ARRAY
490 Generic associative array. Can be searched and iterated over whilst
491 it is being modified. It is also reasonably quick to search and
492 modify. The algorithms are non-recursive, and the trees are highly
497 Documentation/core-api/assoc_array.rst
499 for more information.
506 config HAS_IOPORT_MAP
508 depends on HAS_IOMEM && !NO_IOPORT_MAP
511 source "kernel/dma/Kconfig"
520 config CHECK_SIGNATURE
523 config CPUMASK_OFFSTACK
524 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
526 Use dynamic allocation for cpumask_var_t, instead of putting
527 them on the stack. This is a bit more expensive, but avoids
539 # This actually supports modular compilation, but the module overhead
540 # is ridiculous for the amount of code involved. Until an out-of-tree
541 # driver asks for it, we'll just link it directly it into the kernel
542 # when required. Since we're ignoring out-of-tree users, there's also
543 # no need bother prompting for a manual decision:
544 # prompt "glob_match() function"
546 This option provides a glob_match function for performing
547 simple text pattern matching. It originated in the ATA code
548 to blacklist particular drive models, but other device drivers
549 may need similar functionality.
551 All drivers in the Linux kernel tree that require this function
552 should automatically select this option. Say N unless you
553 are compiling an out-of tree driver which tells you that it
557 tristate "glob self-test on init"
560 This option enables a simple self-test of the glob_match
561 function on startup. It is primarily useful for people
562 working on the code to ensure they haven't introduced any
565 It only adds a little bit of code and slows kernel boot (or
566 module load) by a small amount, so you're welcome to play with
567 it, but you probably don't need it.
570 # Netlink attribute parsing support is select'ed if needed
576 # Generic 64-bit atomic support is selected if needed
578 config GENERIC_ATOMIC64
588 bool "IRQ polling library"
590 Helper library to poll interrupt mitigation using polling.
596 Multiprecision maths library from GnuPG.
597 It is used to implement RSA digital signature verification,
598 which is used by IMA/EVM digital signature extension.
607 Digital signature verification. Currently only RSA is supported.
608 Implementation is done using GnuPG MPI library
613 Dynamic Interrupt Moderation library.
614 Implements an algorithm for dynamically changing CQ moderation values
615 according to run time performance.
618 # libfdt files, only selected if needed.
626 Enable fast lookup object identifier registry.
634 source "lib/vdso/Kconfig"
636 source "lib/fonts/Kconfig"
641 Provides a helper to split scatterlists into chunks, each chunk being
642 a scatterlist. This should be selected by a driver or an API which
643 whishes to split a scatterlist amongst multiple DMA channels.
648 Provides a helper to allocate chained scatterlists. This should be
649 selected by a driver or an API which whishes to allocate chained
656 config ARCH_NO_SG_CHAIN
659 config ARCH_HAS_PMEM_API
665 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
668 # use memcpy to implement user copies for nommu architectures
669 config UACCESS_MEMCPY
672 config ARCH_HAS_UACCESS_FLUSHCACHE
675 # arch has a concept of a recoverable synchronous exception due to a
676 # memory-read error like x86 machine-check or ARM data-abort, and
677 # implements copy_mc_to_{user,kernel} to abort and report
678 # 'bytes-transferred' if that exception fires when accessing the source
680 config ARCH_HAS_COPY_MC
683 # Temporary. Goes away when all archs are cleaned up
684 config ARCH_STACKWALK
691 config STACKDEPOT_ALWAYS_INIT
697 depends on STACKTRACE_SUPPORT
704 tristate "parman" if COMPILE_TEST
707 tristate "objagg" if COMPILE_TEST
711 config GENERIC_IOREMAP
714 config GENERIC_LIB_ASHLDI3
717 config GENERIC_LIB_ASHRDI3
720 config GENERIC_LIB_LSHRDI3
723 config GENERIC_LIB_MULDI3
726 config GENERIC_LIB_CMPDI2
729 config GENERIC_LIB_UCMPDI2
732 config GENERIC_LIB_DEVMEM_IS_ALLOWED