0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # Library configuration
0004 #
0005
0006 config BINARY_PRINTF
0007 def_bool n
0008
0009 menu "Library routines"
0010
0011 config RAID6_PQ
0012 tristate
0013
0014 config RAID6_PQ_BENCHMARK
0015 bool "Automatically choose fastest RAID6 PQ functions"
0016 depends on RAID6_PQ
0017 default y
0018 help
0019 Benchmark all available RAID6 PQ functions on init and choose the
0020 fastest one.
0021
0022 config LINEAR_RANGES
0023 tristate
0024
0025 config PACKING
0026 bool "Generic bitfield packing and unpacking"
0027 default n
0028 help
0029 This option provides the packing() helper function, which permits
0030 converting bitfields between a CPU-usable representation and a
0031 memory representation that can have any combination of these quirks:
0032 - Is little endian (bytes are reversed within a 32-bit group)
0033 - The least-significant 32-bit word comes first (within a 64-bit
0034 group)
0035 - The most significant bit of a byte is at its right (bit 0 of a
0036 register description is numerically 2^7).
0037 Drivers may use these helpers to match the bit indices as described
0038 in the data sheets of the peripherals they are in control of.
0039
0040 When in doubt, say N.
0041
0042 config BITREVERSE
0043 tristate
0044
0045 config HAVE_ARCH_BITREVERSE
0046 bool
0047 default n
0048 help
0049 This option enables the use of hardware bit-reversal instructions on
0050 architectures which support such operations.
0051
0052 config ARCH_HAS_STRNCPY_FROM_USER
0053 bool
0054
0055 config ARCH_HAS_STRNLEN_USER
0056 bool
0057
0058 config GENERIC_STRNCPY_FROM_USER
0059 def_bool !ARCH_HAS_STRNCPY_FROM_USER
0060
0061 config GENERIC_STRNLEN_USER
0062 def_bool !ARCH_HAS_STRNLEN_USER
0063
0064 config GENERIC_NET_UTILS
0065 bool
0066
0067 source "lib/math/Kconfig"
0068
0069 config NO_GENERIC_PCI_IOPORT_MAP
0070 bool
0071
0072 config GENERIC_PCI_IOMAP
0073 bool
0074
0075 config GENERIC_IOMAP
0076 bool
0077 select GENERIC_PCI_IOMAP
0078
0079 config STMP_DEVICE
0080 bool
0081
0082 config ARCH_USE_CMPXCHG_LOCKREF
0083 bool
0084
0085 config ARCH_HAS_FAST_MULTIPLIER
0086 bool
0087
0088 config ARCH_USE_SYM_ANNOTATIONS
0089 bool
0090
0091 config INDIRECT_PIO
0092 bool "Access I/O in non-MMIO mode"
0093 depends on ARM64
0094 help
0095 On some platforms where no separate I/O space exists, there are I/O
0096 hosts which can not be accessed in MMIO mode. Using the logical PIO
0097 mechanism, the host-local I/O resource can be mapped into system
0098 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the
0099 system can access the I/O devices with the mapped-logic PIO through
0100 I/O accessors.
0101
0102 This way has relatively little I/O performance cost. Please make
0103 sure your devices really need this configure item enabled.
0104
0105 When in doubt, say N.
0106
0107 config INDIRECT_IOMEM
0108 bool
0109 help
0110 This is selected by other options/architectures to provide the
0111 emulated iomem accessors.
0112
0113 config INDIRECT_IOMEM_FALLBACK
0114 bool
0115 depends on INDIRECT_IOMEM
0116 help
0117 If INDIRECT_IOMEM is selected, this enables falling back to plain
0118 mmio accesses when the IO memory address is not a registered
0119 emulated region.
0120
0121 config TRACE_MMIO_ACCESS
0122 bool "Register read/write tracing"
0123 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS
0124 help
0125 Create tracepoints for MMIO read/write operations. These trace events
0126 can be used for logging all MMIO read/write operations.
0127
0128 source "lib/crypto/Kconfig"
0129
0130 config LIB_MEMNEQ
0131 bool
0132
0133 config CRC_CCITT
0134 tristate "CRC-CCITT functions"
0135 help
0136 This option is provided for the case where no in-kernel-tree
0137 modules require CRC-CCITT functions, but a module built outside
0138 the kernel tree does. Such modules that use library CRC-CCITT
0139 functions require M here.
0140
0141 config CRC16
0142 tristate "CRC16 functions"
0143 help
0144 This option is provided for the case where no in-kernel-tree
0145 modules require CRC16 functions, but a module built outside
0146 the kernel tree does. Such modules that use library CRC16
0147 functions require M here.
0148
0149 config CRC_T10DIF
0150 tristate "CRC calculation for the T10 Data Integrity Field"
0151 select CRYPTO
0152 select CRYPTO_CRCT10DIF
0153 help
0154 This option is only needed if a module that's not in the
0155 kernel tree needs to calculate CRC checks for use with the
0156 SCSI data integrity subsystem.
0157
0158 config CRC64_ROCKSOFT
0159 tristate "CRC calculation for the Rocksoft model CRC64"
0160 select CRC64
0161 select CRYPTO
0162 select CRYPTO_CRC64_ROCKSOFT
0163 help
0164 This option provides a CRC64 API to a registered crypto driver.
0165 This is used with the block layer's data integrity subsystem.
0166
0167 config CRC_ITU_T
0168 tristate "CRC ITU-T V.41 functions"
0169 help
0170 This option is provided for the case where no in-kernel-tree
0171 modules require CRC ITU-T V.41 functions, but a module built outside
0172 the kernel tree does. Such modules that use library CRC ITU-T V.41
0173 functions require M here.
0174
0175 config CRC32
0176 tristate "CRC32/CRC32c functions"
0177 default y
0178 select BITREVERSE
0179 help
0180 This option is provided for the case where no in-kernel-tree
0181 modules require CRC32/CRC32c functions, but a module built outside
0182 the kernel tree does. Such modules that use library CRC32/CRC32c
0183 functions require M here.
0184
0185 config CRC32_SELFTEST
0186 tristate "CRC32 perform self test on init"
0187 depends on CRC32
0188 help
0189 This option enables the CRC32 library functions to perform a
0190 self test on initialization. The self test computes crc32_le
0191 and crc32_be over byte strings with random alignment and length
0192 and computes the total elapsed time and number of bytes processed.
0193
0194 choice
0195 prompt "CRC32 implementation"
0196 depends on CRC32
0197 default CRC32_SLICEBY8
0198 help
0199 This option allows a kernel builder to override the default choice
0200 of CRC32 algorithm. Choose the default ("slice by 8") unless you
0201 know that you need one of the others.
0202
0203 config CRC32_SLICEBY8
0204 bool "Slice by 8 bytes"
0205 help
0206 Calculate checksum 8 bytes at a time with a clever slicing algorithm.
0207 This is the fastest algorithm, but comes with a 8KiB lookup table.
0208 Most modern processors have enough cache to hold this table without
0209 thrashing the cache.
0210
0211 This is the default implementation choice. Choose this one unless
0212 you have a good reason not to.
0213
0214 config CRC32_SLICEBY4
0215 bool "Slice by 4 bytes"
0216 help
0217 Calculate checksum 4 bytes at a time with a clever slicing algorithm.
0218 This is a bit slower than slice by 8, but has a smaller 4KiB lookup
0219 table.
0220
0221 Only choose this option if you know what you are doing.
0222
0223 config CRC32_SARWATE
0224 bool "Sarwate's Algorithm (one byte at a time)"
0225 help
0226 Calculate checksum a byte at a time using Sarwate's algorithm. This
0227 is not particularly fast, but has a small 256 byte lookup table.
0228
0229 Only choose this option if you know what you are doing.
0230
0231 config CRC32_BIT
0232 bool "Classic Algorithm (one bit at a time)"
0233 help
0234 Calculate checksum one bit at a time. This is VERY slow, but has
0235 no lookup table. This is provided as a debugging option.
0236
0237 Only choose this option if you are debugging crc32.
0238
0239 endchoice
0240
0241 config CRC64
0242 tristate "CRC64 functions"
0243 help
0244 This option is provided for the case where no in-kernel-tree
0245 modules require CRC64 functions, but a module built outside
0246 the kernel tree does. Such modules that use library CRC64
0247 functions require M here.
0248
0249 config CRC4
0250 tristate "CRC4 functions"
0251 help
0252 This option is provided for the case where no in-kernel-tree
0253 modules require CRC4 functions, but a module built outside
0254 the kernel tree does. Such modules that use library CRC4
0255 functions require M here.
0256
0257 config CRC7
0258 tristate "CRC7 functions"
0259 help
0260 This option is provided for the case where no in-kernel-tree
0261 modules require CRC7 functions, but a module built outside
0262 the kernel tree does. Such modules that use library CRC7
0263 functions require M here.
0264
0265 config LIBCRC32C
0266 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
0267 select CRYPTO
0268 select CRYPTO_CRC32C
0269 help
0270 This option is provided for the case where no in-kernel-tree
0271 modules require CRC32c functions, but a module built outside the
0272 kernel tree does. Such modules that use library CRC32c functions
0273 require M here. See Castagnoli93.
0274 Module will be libcrc32c.
0275
0276 config CRC8
0277 tristate "CRC8 function"
0278 help
0279 This option provides CRC8 function. Drivers may select this
0280 when they need to do cyclic redundancy check according CRC8
0281 algorithm. Module will be called crc8.
0282
0283 config XXHASH
0284 tristate
0285
0286 config AUDIT_GENERIC
0287 bool
0288 depends on AUDIT && !AUDIT_ARCH
0289 default y
0290
0291 config AUDIT_ARCH_COMPAT_GENERIC
0292 bool
0293 default n
0294
0295 config AUDIT_COMPAT_GENERIC
0296 bool
0297 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
0298 default y
0299
0300 config RANDOM32_SELFTEST
0301 bool "PRNG perform self test on init"
0302 help
0303 This option enables the 32 bit PRNG library functions to perform a
0304 self test on initialization.
0305
0306 #
0307 # compression support is select'ed if needed
0308 #
0309 config 842_COMPRESS
0310 select CRC32
0311 tristate
0312
0313 config 842_DECOMPRESS
0314 select CRC32
0315 tristate
0316
0317 config ZLIB_INFLATE
0318 tristate
0319
0320 config ZLIB_DEFLATE
0321 tristate
0322 select BITREVERSE
0323
0324 config ZLIB_DFLTCC
0325 def_bool y
0326 depends on S390
0327 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
0328 help
0329 Enable s390x hardware support for zlib in the kernel.
0330
0331 config LZO_COMPRESS
0332 tristate
0333
0334 config LZO_DECOMPRESS
0335 tristate
0336
0337 config LZ4_COMPRESS
0338 tristate
0339
0340 config LZ4HC_COMPRESS
0341 tristate
0342
0343 config LZ4_DECOMPRESS
0344 tristate
0345
0346 config ZSTD_COMPRESS
0347 select XXHASH
0348 tristate
0349
0350 config ZSTD_DECOMPRESS
0351 select XXHASH
0352 tristate
0353
0354 source "lib/xz/Kconfig"
0355
0356 #
0357 # These all provide a common interface (hence the apparent duplication with
0358 # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
0359 #
0360 config DECOMPRESS_GZIP
0361 select ZLIB_INFLATE
0362 tristate
0363
0364 config DECOMPRESS_BZIP2
0365 tristate
0366
0367 config DECOMPRESS_LZMA
0368 tristate
0369
0370 config DECOMPRESS_XZ
0371 select XZ_DEC
0372 tristate
0373
0374 config DECOMPRESS_LZO
0375 select LZO_DECOMPRESS
0376 tristate
0377
0378 config DECOMPRESS_LZ4
0379 select LZ4_DECOMPRESS
0380 tristate
0381
0382 config DECOMPRESS_ZSTD
0383 select ZSTD_DECOMPRESS
0384 tristate
0385
0386 #
0387 # Generic allocator support is selected if needed
0388 #
0389 config GENERIC_ALLOCATOR
0390 bool
0391
0392 #
0393 # reed solomon support is select'ed if needed
0394 #
0395 config REED_SOLOMON
0396 tristate
0397
0398 config REED_SOLOMON_ENC8
0399 bool
0400
0401 config REED_SOLOMON_DEC8
0402 bool
0403
0404 config REED_SOLOMON_ENC16
0405 bool
0406
0407 config REED_SOLOMON_DEC16
0408 bool
0409
0410 #
0411 # BCH support is selected if needed
0412 #
0413 config BCH
0414 tristate
0415
0416 config BCH_CONST_PARAMS
0417 bool
0418 help
0419 Drivers may select this option to force specific constant
0420 values for parameters 'm' (Galois field order) and 't'
0421 (error correction capability). Those specific values must
0422 be set by declaring default values for symbols BCH_CONST_M
0423 and BCH_CONST_T.
0424 Doing so will enable extra compiler optimizations,
0425 improving encoding and decoding performance up to 2x for
0426 usual (m,t) values (typically such that m*t < 200).
0427 When this option is selected, the BCH library supports
0428 only a single (m,t) configuration. This is mainly useful
0429 for NAND flash board drivers requiring known, fixed BCH
0430 parameters.
0431
0432 config BCH_CONST_M
0433 int
0434 range 5 15
0435 help
0436 Constant value for Galois field order 'm'. If 'k' is the
0437 number of data bits to protect, 'm' should be chosen such
0438 that (k + m*t) <= 2**m - 1.
0439 Drivers should declare a default value for this symbol if
0440 they select option BCH_CONST_PARAMS.
0441
0442 config BCH_CONST_T
0443 int
0444 help
0445 Constant value for error correction capability in bits 't'.
0446 Drivers should declare a default value for this symbol if
0447 they select option BCH_CONST_PARAMS.
0448
0449 #
0450 # Textsearch support is select'ed if needed
0451 #
0452 config TEXTSEARCH
0453 bool
0454
0455 config TEXTSEARCH_KMP
0456 tristate
0457
0458 config TEXTSEARCH_BM
0459 tristate
0460
0461 config TEXTSEARCH_FSM
0462 tristate
0463
0464 config BTREE
0465 bool
0466
0467 config INTERVAL_TREE
0468 bool
0469 help
0470 Simple, embeddable, interval-tree. Can find the start of an
0471 overlapping range in log(n) time and then iterate over all
0472 overlapping nodes. The algorithm is implemented as an
0473 augmented rbtree.
0474
0475 See:
0476
0477 Documentation/core-api/rbtree.rst
0478
0479 for more information.
0480
0481 config XARRAY_MULTI
0482 bool
0483 help
0484 Support entries which occupy multiple consecutive indices in the
0485 XArray.
0486
0487 config ASSOCIATIVE_ARRAY
0488 bool
0489 help
0490 Generic associative array. Can be searched and iterated over whilst
0491 it is being modified. It is also reasonably quick to search and
0492 modify. The algorithms are non-recursive, and the trees are highly
0493 capacious.
0494
0495 See:
0496
0497 Documentation/core-api/assoc_array.rst
0498
0499 for more information.
0500
0501 config HAS_IOMEM
0502 bool
0503 depends on !NO_IOMEM
0504 default y
0505
0506 config HAS_IOPORT_MAP
0507 bool
0508 depends on HAS_IOMEM && !NO_IOPORT_MAP
0509 default y
0510
0511 source "kernel/dma/Kconfig"
0512
0513 config SGL_ALLOC
0514 bool
0515 default n
0516
0517 config IOMMU_HELPER
0518 bool
0519
0520 config CHECK_SIGNATURE
0521 bool
0522
0523 config CPUMASK_OFFSTACK
0524 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
0525 help
0526 Use dynamic allocation for cpumask_var_t, instead of putting
0527 them on the stack. This is a bit more expensive, but avoids
0528 stack overflow.
0529
0530 config CPU_RMAP
0531 bool
0532 depends on SMP
0533
0534 config DQL
0535 bool
0536
0537 config GLOB
0538 bool
0539 # This actually supports modular compilation, but the module overhead
0540 # is ridiculous for the amount of code involved. Until an out-of-tree
0541 # driver asks for it, we'll just link it directly it into the kernel
0542 # when required. Since we're ignoring out-of-tree users, there's also
0543 # no need bother prompting for a manual decision:
0544 # prompt "glob_match() function"
0545 help
0546 This option provides a glob_match function for performing
0547 simple text pattern matching. It originated in the ATA code
0548 to blacklist particular drive models, but other device drivers
0549 may need similar functionality.
0550
0551 All drivers in the Linux kernel tree that require this function
0552 should automatically select this option. Say N unless you
0553 are compiling an out-of tree driver which tells you that it
0554 depends on this.
0555
0556 config GLOB_SELFTEST
0557 tristate "glob self-test on init"
0558 depends on GLOB
0559 help
0560 This option enables a simple self-test of the glob_match
0561 function on startup. It is primarily useful for people
0562 working on the code to ensure they haven't introduced any
0563 regressions.
0564
0565 It only adds a little bit of code and slows kernel boot (or
0566 module load) by a small amount, so you're welcome to play with
0567 it, but you probably don't need it.
0568
0569 #
0570 # Netlink attribute parsing support is select'ed if needed
0571 #
0572 config NLATTR
0573 bool
0574
0575 #
0576 # Generic 64-bit atomic support is selected if needed
0577 #
0578 config GENERIC_ATOMIC64
0579 bool
0580
0581 config LRU_CACHE
0582 tristate
0583
0584 config CLZ_TAB
0585 bool
0586
0587 config IRQ_POLL
0588 bool "IRQ polling library"
0589 help
0590 Helper library to poll interrupt mitigation using polling.
0591
0592 config MPILIB
0593 tristate
0594 select CLZ_TAB
0595 help
0596 Multiprecision maths library from GnuPG.
0597 It is used to implement RSA digital signature verification,
0598 which is used by IMA/EVM digital signature extension.
0599
0600 config SIGNATURE
0601 tristate
0602 depends on KEYS
0603 select CRYPTO
0604 select CRYPTO_SHA1
0605 select MPILIB
0606 help
0607 Digital signature verification. Currently only RSA is supported.
0608 Implementation is done using GnuPG MPI library
0609
0610 config DIMLIB
0611 bool
0612 help
0613 Dynamic Interrupt Moderation library.
0614 Implements an algorithm for dynamically changing CQ moderation values
0615 according to run time performance.
0616
0617 #
0618 # libfdt files, only selected if needed.
0619 #
0620 config LIBFDT
0621 bool
0622
0623 config OID_REGISTRY
0624 tristate
0625 help
0626 Enable fast lookup object identifier registry.
0627
0628 config UCS2_STRING
0629 tristate
0630
0631 #
0632 # generic vdso
0633 #
0634 source "lib/vdso/Kconfig"
0635
0636 source "lib/fonts/Kconfig"
0637
0638 config SG_SPLIT
0639 def_bool n
0640 help
0641 Provides a helper to split scatterlists into chunks, each chunk being
0642 a scatterlist. This should be selected by a driver or an API which
0643 whishes to split a scatterlist amongst multiple DMA channels.
0644
0645 config SG_POOL
0646 def_bool n
0647 help
0648 Provides a helper to allocate chained scatterlists. This should be
0649 selected by a driver or an API which whishes to allocate chained
0650 scatterlist.
0651
0652 #
0653 # sg chaining option
0654 #
0655
0656 config ARCH_NO_SG_CHAIN
0657 def_bool n
0658
0659 config ARCH_HAS_PMEM_API
0660 bool
0661
0662 config MEMREGION
0663 bool
0664
0665 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
0666 bool
0667
0668 # use memcpy to implement user copies for nommu architectures
0669 config UACCESS_MEMCPY
0670 bool
0671
0672 config ARCH_HAS_UACCESS_FLUSHCACHE
0673 bool
0674
0675 # arch has a concept of a recoverable synchronous exception due to a
0676 # memory-read error like x86 machine-check or ARM data-abort, and
0677 # implements copy_mc_to_{user,kernel} to abort and report
0678 # 'bytes-transferred' if that exception fires when accessing the source
0679 # buffer.
0680 config ARCH_HAS_COPY_MC
0681 bool
0682
0683 # Temporary. Goes away when all archs are cleaned up
0684 config ARCH_STACKWALK
0685 bool
0686
0687 config STACKDEPOT
0688 bool
0689 select STACKTRACE
0690
0691 config STACKDEPOT_ALWAYS_INIT
0692 bool
0693 select STACKDEPOT
0694
0695 config REF_TRACKER
0696 bool
0697 depends on STACKTRACE_SUPPORT
0698 select STACKDEPOT
0699
0700 config SBITMAP
0701 bool
0702
0703 config PARMAN
0704 tristate "parman" if COMPILE_TEST
0705
0706 config OBJAGG
0707 tristate "objagg" if COMPILE_TEST
0708
0709 endmenu
0710
0711 config GENERIC_IOREMAP
0712 bool
0713
0714 config GENERIC_LIB_ASHLDI3
0715 bool
0716
0717 config GENERIC_LIB_ASHRDI3
0718 bool
0719
0720 config GENERIC_LIB_LSHRDI3
0721 bool
0722
0723 config GENERIC_LIB_MULDI3
0724 bool
0725
0726 config GENERIC_LIB_CMPDI2
0727 bool
0728
0729 config GENERIC_LIB_UCMPDI2
0730 bool
0731
0732 config GENERIC_LIB_DEVMEM_IS_ALLOWED
0733 bool
0734
0735 config PLDMFW
0736 bool
0737 default n
0738
0739 config ASN1_ENCODER
0740 tristate
0741
0742 config POLYNOMIAL
0743 tristate