2 # Library configuration
8 menu "Library routines"
16 config HAVE_ARCH_BITREVERSE
20 This option enables the use of hardware bit-reversal instructions on
21 architectures which support such operations.
26 config GENERIC_STRNCPY_FROM_USER
29 config GENERIC_STRNLEN_USER
32 config GENERIC_NET_UTILS
35 config GENERIC_FIND_FIRST_BIT
38 config NO_GENERIC_PCI_IOPORT_MAP
41 config GENERIC_PCI_IOMAP
46 select GENERIC_PCI_IOMAP
51 config ARCH_USE_CMPXCHG_LOCKREF
54 config ARCH_HAS_FAST_MULTIPLIER
58 bool "Access I/O in non-MMIO mode"
61 On some platforms where no separate I/O space exists, there are I/O
62 hosts which can not be accessed in MMIO mode. Using the logical PIO
63 mechanism, the host-local I/O resource can be mapped into system
64 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
65 system can access the I/O devices with the mapped-logic PIO through
68 This way has relatively little I/O performance cost. Please make
69 sure your devices really need this configure item enabled.
74 tristate "CRC-CCITT functions"
76 This option is provided for the case where no in-kernel-tree
77 modules require CRC-CCITT functions, but a module built outside
78 the kernel tree does. Such modules that use library CRC-CCITT
79 functions require M here.
82 tristate "CRC16 functions"
84 This option is provided for the case where no in-kernel-tree
85 modules require CRC16 functions, but a module built outside
86 the kernel tree does. Such modules that use library CRC16
87 functions require M here.
90 tristate "CRC calculation for the T10 Data Integrity Field"
92 select CRYPTO_CRCT10DIF
94 This option is only needed if a module that's not in the
95 kernel tree needs to calculate CRC checks for use with the
96 SCSI data integrity subsystem.
99 tristate "CRC ITU-T V.41 functions"
101 This option is provided for the case where no in-kernel-tree
102 modules require CRC ITU-T V.41 functions, but a module built outside
103 the kernel tree does. Such modules that use library CRC ITU-T V.41
104 functions require M here.
107 tristate "CRC32/CRC32c functions"
111 This option is provided for the case where no in-kernel-tree
112 modules require CRC32/CRC32c functions, but a module built outside
113 the kernel tree does. Such modules that use library CRC32/CRC32c
114 functions require M here.
116 config CRC32_SELFTEST
117 tristate "CRC32 perform self test on init"
120 This option enables the CRC32 library functions to perform a
121 self test on initialization. The self test computes crc32_le
122 and crc32_be over byte strings with random alignment and length
123 and computes the total elapsed time and number of bytes processed.
126 prompt "CRC32 implementation"
128 default CRC32_SLICEBY8
130 This option allows a kernel builder to override the default choice
131 of CRC32 algorithm. Choose the default ("slice by 8") unless you
132 know that you need one of the others.
134 config CRC32_SLICEBY8
135 bool "Slice by 8 bytes"
137 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
138 This is the fastest algorithm, but comes with a 8KiB lookup table.
139 Most modern processors have enough cache to hold this table without
142 This is the default implementation choice. Choose this one unless
143 you have a good reason not to.
145 config CRC32_SLICEBY4
146 bool "Slice by 4 bytes"
148 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
149 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
152 Only choose this option if you know what you are doing.
155 bool "Sarwate's Algorithm (one byte at a time)"
157 Calculate checksum a byte at a time using Sarwate's algorithm. This
158 is not particularly fast, but has a small 256 byte lookup table.
160 Only choose this option if you know what you are doing.
163 bool "Classic Algorithm (one bit at a time)"
165 Calculate checksum one bit at a time. This is VERY slow, but has
166 no lookup table. This is provided as a debugging option.
168 Only choose this option if you are debugging crc32.
173 tristate "CRC64 functions"
175 This option is provided for the case where no in-kernel-tree
176 modules require CRC64 functions, but a module built outside
177 the kernel tree does. Such modules that use library CRC64
178 functions require M here.
181 tristate "CRC4 functions"
183 This option is provided for the case where no in-kernel-tree
184 modules require CRC4 functions, but a module built outside
185 the kernel tree does. Such modules that use library CRC4
186 functions require M here.
189 tristate "CRC7 functions"
191 This option is provided for the case where no in-kernel-tree
192 modules require CRC7 functions, but a module built outside
193 the kernel tree does. Such modules that use library CRC7
194 functions require M here.
197 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
201 This option is provided for the case where no in-kernel-tree
202 modules require CRC32c functions, but a module built outside the
203 kernel tree does. Such modules that use library CRC32c functions
204 require M here. See Castagnoli93.
205 Module will be libcrc32c.
208 tristate "CRC8 function"
210 This option provides CRC8 function. Drivers may select this
211 when they need to do cyclic redundancy check according CRC8
212 algorithm. Module will be called crc8.
219 depends on AUDIT && !AUDIT_ARCH
222 config AUDIT_ARCH_COMPAT_GENERIC
226 config AUDIT_COMPAT_GENERIC
228 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
231 config RANDOM32_SELFTEST
232 bool "PRNG perform self test on init"
234 This option enables the 32 bit PRNG library functions to perform a
235 self test on initialization.
238 # compression support is select'ed if needed
244 config 842_DECOMPRESS
258 config LZO_DECOMPRESS
264 config LZ4HC_COMPRESS
267 config LZ4_DECOMPRESS
274 config ZSTD_DECOMPRESS
278 source "lib/xz/Kconfig"
281 # These all provide a common interface (hence the apparent duplication with
282 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
284 config DECOMPRESS_GZIP
288 config DECOMPRESS_BZIP2
291 config DECOMPRESS_LZMA
298 config DECOMPRESS_LZO
299 select LZO_DECOMPRESS
302 config DECOMPRESS_LZ4
303 select LZ4_DECOMPRESS
307 # Generic allocator support is selected if needed
309 config GENERIC_ALLOCATOR
313 # reed solomon support is select'ed if needed
318 config REED_SOLOMON_ENC8
321 config REED_SOLOMON_DEC8
324 config REED_SOLOMON_ENC16
327 config REED_SOLOMON_DEC16
331 # BCH support is selected if needed
336 config BCH_CONST_PARAMS
339 Drivers may select this option to force specific constant
340 values for parameters 'm' (Galois field order) and 't'
341 (error correction capability). Those specific values must
342 be set by declaring default values for symbols BCH_CONST_M
344 Doing so will enable extra compiler optimizations,
345 improving encoding and decoding performance up to 2x for
346 usual (m,t) values (typically such that m*t < 200).
347 When this option is selected, the BCH library supports
348 only a single (m,t) configuration. This is mainly useful
349 for NAND flash board drivers requiring known, fixed BCH
356 Constant value for Galois field order 'm'. If 'k' is the
357 number of data bits to protect, 'm' should be chosen such
358 that (k + m*t) <= 2**m - 1.
359 Drivers should declare a default value for this symbol if
360 they select option BCH_CONST_PARAMS.
365 Constant value for error correction capability in bits 't'.
366 Drivers should declare a default value for this symbol if
367 they select option BCH_CONST_PARAMS.
370 # Textsearch support is select'ed if needed
375 config TEXTSEARCH_KMP
381 config TEXTSEARCH_FSM
390 Simple, embeddable, interval-tree. Can find the start of an
391 overlapping range in log(n) time and then iterate over all
392 overlapping nodes. The algorithm is implemented as an
397 Documentation/rbtree.txt
399 for more information.
401 config RADIX_TREE_MULTIORDER
404 config ASSOCIATIVE_ARRAY
407 Generic associative array. Can be searched and iterated over whilst
408 it is being modified. It is also reasonably quick to search and
409 modify. The algorithms are non-recursive, and the trees are highly
414 Documentation/core-api/assoc_array.rst
416 for more information.
424 config HAS_IOPORT_MAP
426 depends on HAS_IOMEM && !NO_IOPORT_MAP
429 source "kernel/dma/Kconfig"
438 config CHECK_SIGNATURE
441 config CPUMASK_OFFSTACK
442 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
444 Use dynamic allocation for cpumask_var_t, instead of putting
445 them on the stack. This is a bit more expensive, but avoids
457 # This actually supports modular compilation, but the module overhead
458 # is ridiculous for the amount of code involved. Until an out-of-tree
459 # driver asks for it, we'll just link it directly it into the kernel
460 # when required. Since we're ignoring out-of-tree users, there's also
461 # no need bother prompting for a manual decision:
462 # prompt "glob_match() function"
464 This option provides a glob_match function for performing
465 simple text pattern matching. It originated in the ATA code
466 to blacklist particular drive models, but other device drivers
467 may need similar functionality.
469 All drivers in the Linux kernel tree that require this function
470 should automatically select this option. Say N unless you
471 are compiling an out-of tree driver which tells you that it
475 tristate "glob self-test on init"
478 This option enables a simple self-test of the glob_match
479 function on startup. It is primarily useful for people
480 working on the code to ensure they haven't introduced any
483 It only adds a little bit of code and slows kernel boot (or
484 module load) by a small amount, so you're welcome to play with
485 it, but you probably don't need it.
488 # Netlink attribute parsing support is select'ed if needed
494 # Generic 64-bit atomic support is selected if needed
496 config GENERIC_ATOMIC64
506 tristate "CORDIC algorithm"
508 This option provides an implementation of the CORDIC algorithm;
509 calculations are in fixed point. Module will be called cordic.
512 bool "JEDEC DDR data"
514 Data from JEDEC specs for DDR SDRAM memories,
515 particularly the AC timing parameters and addressing
516 information. This data is useful for drivers handling
517 DDR SDRAM controllers.
520 bool "IRQ polling library"
522 Helper library to poll interrupt mitigation using polling.
528 Multiprecision maths library from GnuPG.
529 It is used to implement RSA digital signature verification,
530 which is used by IMA/EVM digital signature extension.
539 Digital signature verification. Currently only RSA is supported.
540 Implementation is done using GnuPG MPI library
543 # libfdt files, only selected if needed.
551 Enable fast lookup object identifier registry.
556 source "lib/fonts/Kconfig"
561 Provides a helper to split scatterlists into chunks, each chunk being
562 a scatterlist. This should be selected by a driver or an API which
563 whishes to split a scatterlist amongst multiple DMA channels.
568 Provides a helper to allocate chained scatterlists. This should be
569 selected by a driver or an API which whishes to allocate chained
576 config ARCH_HAS_SG_CHAIN
579 config ARCH_HAS_PMEM_API
582 config ARCH_HAS_UACCESS_FLUSHCACHE
585 config ARCH_HAS_UACCESS_MCSAFE
596 tristate "parman" if COMPILE_TEST
601 config STRING_SELFTEST
602 tristate "Test string functions"
606 config GENERIC_LIB_ASHLDI3
609 config GENERIC_LIB_ASHRDI3
612 config GENERIC_LIB_LSHRDI3
615 config GENERIC_LIB_MULDI3
618 config GENERIC_LIB_CMPDI2
621 config GENERIC_LIB_UCMPDI2