| 1 | # SPDX-License-Identifier: GPL-2.0-only |
| 2 | # |
| 3 | # Library configuration |
| 4 | # |
| 5 | |
| 6 | config BINARY_PRINTF |
| 7 | def_bool n |
| 8 | |
| 9 | menu "Library routines" |
| 10 | |
| 11 | config LINEAR_RANGES |
| 12 | tristate |
| 13 | |
| 14 | config PACKING |
| 15 | bool "Generic bitfield packing and unpacking" |
| 16 | select BITREVERSE |
| 17 | default n |
| 18 | help |
| 19 | This option provides the packing() helper function, which permits |
| 20 | converting bitfields between a CPU-usable representation and a |
| 21 | memory representation that can have any combination of these quirks: |
| 22 | - Is little endian (bytes are reversed within a 32-bit group) |
| 23 | - The least-significant 32-bit word comes first (within a 64-bit |
| 24 | group) |
| 25 | - The most significant bit of a byte is at its right (bit 0 of a |
| 26 | register description is numerically 2^7). |
| 27 | Drivers may use these helpers to match the bit indices as described |
| 28 | in the data sheets of the peripherals they are in control of. |
| 29 | |
| 30 | When in doubt, say N. |
| 31 | |
| 32 | config PACKING_KUNIT_TEST |
| 33 | tristate "KUnit tests for packing library" if !KUNIT_ALL_TESTS |
| 34 | depends on PACKING && KUNIT |
| 35 | default KUNIT_ALL_TESTS |
| 36 | help |
| 37 | This builds KUnit tests for the packing library. |
| 38 | |
| 39 | For more information on KUnit and unit tests in general, |
| 40 | please refer to the KUnit documentation in Documentation/dev-tools/kunit/. |
| 41 | |
| 42 | When in doubt, say N. |
| 43 | |
| 44 | config BITREVERSE |
| 45 | tristate |
| 46 | select GENERIC_BITREVERSE if !HAVE_ARCH_BITREVERSE |
| 47 | |
| 48 | config HAVE_ARCH_BITREVERSE |
| 49 | bool |
| 50 | default n |
| 51 | depends on BITREVERSE |
| 52 | help |
| 53 | This option enables the use of hardware bit-reversal instructions on |
| 54 | architectures which support such operations. |
| 55 | |
| 56 | config GENERIC_BITREVERSE |
| 57 | tristate |
| 58 | depends on BITREVERSE |
| 59 | help |
| 60 | Generic bit reversal implementation. Drivers should never enable |
| 61 | it explicitly. Instead, enable BITREVERSE. |
| 62 | |
| 63 | Architectures may want to select it as a fall-back option for |
| 64 | HAVE_ARCH_BITREVERSE, when the hardware-accelerated bit reverse |
| 65 | instruction set is optional, like RISC-V ZBKB extension. |
| 66 | |
| 67 | config ARCH_HAS_STRNCPY_FROM_USER |
| 68 | bool |
| 69 | |
| 70 | config ARCH_HAS_STRNLEN_USER |
| 71 | bool |
| 72 | |
| 73 | config GENERIC_STRNCPY_FROM_USER |
| 74 | def_bool !ARCH_HAS_STRNCPY_FROM_USER |
| 75 | |
| 76 | config GENERIC_STRNLEN_USER |
| 77 | def_bool !ARCH_HAS_STRNLEN_USER |
| 78 | |
| 79 | config GENERIC_NET_UTILS |
| 80 | bool |
| 81 | |
| 82 | source "lib/math/Kconfig" |
| 83 | |
| 84 | config NO_GENERIC_PCI_IOPORT_MAP |
| 85 | bool |
| 86 | |
| 87 | config GENERIC_IOMAP |
| 88 | bool |
| 89 | select GENERIC_PCI_IOMAP |
| 90 | |
| 91 | config STMP_DEVICE |
| 92 | bool |
| 93 | |
| 94 | config ARCH_USE_CMPXCHG_LOCKREF |
| 95 | bool |
| 96 | |
| 97 | config ARCH_HAS_FAST_MULTIPLIER |
| 98 | bool |
| 99 | |
| 100 | config ARCH_USE_SYM_ANNOTATIONS |
| 101 | bool |
| 102 | |
| 103 | config INDIRECT_PIO |
| 104 | bool "Access I/O in non-MMIO mode" |
| 105 | depends on ARM64 |
| 106 | depends on HAS_IOPORT |
| 107 | help |
| 108 | On some platforms where no separate I/O space exists, there are I/O |
| 109 | hosts which can not be accessed in MMIO mode. Using the logical PIO |
| 110 | mechanism, the host-local I/O resource can be mapped into system |
| 111 | logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the |
| 112 | system can access the I/O devices with the mapped-logic PIO through |
| 113 | I/O accessors. |
| 114 | |
| 115 | This way has relatively little I/O performance cost. Please make |
| 116 | sure your devices really need this configure item enabled. |
| 117 | |
| 118 | When in doubt, say N. |
| 119 | |
| 120 | config INDIRECT_IOMEM |
| 121 | bool |
| 122 | help |
| 123 | This is selected by other options/architectures to provide the |
| 124 | emulated iomem accessors. |
| 125 | |
| 126 | config INDIRECT_IOMEM_FALLBACK |
| 127 | bool |
| 128 | depends on INDIRECT_IOMEM |
| 129 | help |
| 130 | If INDIRECT_IOMEM is selected, this enables falling back to plain |
| 131 | mmio accesses when the IO memory address is not a registered |
| 132 | emulated region. |
| 133 | |
| 134 | config TRACE_MMIO_ACCESS |
| 135 | bool "Register read/write tracing" |
| 136 | depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS |
| 137 | help |
| 138 | Create tracepoints for MMIO read/write operations. These trace events |
| 139 | can be used for logging all MMIO read/write operations. |
| 140 | |
| 141 | source "lib/crc/Kconfig" |
| 142 | source "lib/crypto/Kconfig" |
| 143 | source "lib/raid/Kconfig" |
| 144 | |
| 145 | config XXHASH |
| 146 | tristate |
| 147 | |
| 148 | config AUDIT_GENERIC |
| 149 | bool |
| 150 | depends on AUDIT && !AUDIT_ARCH |
| 151 | default y |
| 152 | |
| 153 | config AUDIT_ARCH_COMPAT_GENERIC |
| 154 | bool |
| 155 | default n |
| 156 | |
| 157 | config AUDIT_COMPAT_GENERIC |
| 158 | bool |
| 159 | depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT |
| 160 | default y |
| 161 | |
| 162 | # |
| 163 | # compression support is select'ed if needed |
| 164 | # |
| 165 | config 842_COMPRESS |
| 166 | select CRC32 |
| 167 | tristate |
| 168 | |
| 169 | config 842_DECOMPRESS |
| 170 | select CRC32 |
| 171 | tristate |
| 172 | |
| 173 | config ZLIB_INFLATE |
| 174 | tristate |
| 175 | |
| 176 | config ZLIB_DEFLATE |
| 177 | tristate |
| 178 | select BITREVERSE |
| 179 | |
| 180 | config ZLIB_DFLTCC |
| 181 | def_bool y |
| 182 | depends on S390 |
| 183 | prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib" |
| 184 | help |
| 185 | Enable s390x hardware support for zlib in the kernel. |
| 186 | |
| 187 | config LZO_COMPRESS |
| 188 | tristate |
| 189 | |
| 190 | config LZO_DECOMPRESS |
| 191 | tristate |
| 192 | |
| 193 | config LZ4_COMPRESS |
| 194 | tristate |
| 195 | |
| 196 | config LZ4HC_COMPRESS |
| 197 | tristate |
| 198 | |
| 199 | config LZ4_DECOMPRESS |
| 200 | tristate |
| 201 | |
| 202 | config ZSTD_COMMON |
| 203 | select XXHASH |
| 204 | tristate |
| 205 | |
| 206 | config ZSTD_COMPRESS |
| 207 | select ZSTD_COMMON |
| 208 | tristate |
| 209 | |
| 210 | config ZSTD_DECOMPRESS |
| 211 | select ZSTD_COMMON |
| 212 | tristate |
| 213 | |
| 214 | source "lib/xz/Kconfig" |
| 215 | |
| 216 | # |
| 217 | # These all provide a common interface (hence the apparent duplication with |
| 218 | # ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.) |
| 219 | # |
| 220 | config DECOMPRESS_GZIP |
| 221 | select ZLIB_INFLATE |
| 222 | tristate |
| 223 | |
| 224 | config DECOMPRESS_BZIP2 |
| 225 | tristate |
| 226 | |
| 227 | config DECOMPRESS_LZMA |
| 228 | tristate |
| 229 | |
| 230 | config DECOMPRESS_XZ |
| 231 | select XZ_DEC |
| 232 | tristate |
| 233 | |
| 234 | config DECOMPRESS_LZO |
| 235 | select LZO_DECOMPRESS |
| 236 | tristate |
| 237 | |
| 238 | config DECOMPRESS_LZ4 |
| 239 | select LZ4_DECOMPRESS |
| 240 | tristate |
| 241 | |
| 242 | config DECOMPRESS_ZSTD |
| 243 | select ZSTD_DECOMPRESS |
| 244 | tristate |
| 245 | |
| 246 | # |
| 247 | # Generic allocator support is selected if needed |
| 248 | # |
| 249 | config GENERIC_ALLOCATOR |
| 250 | bool |
| 251 | |
| 252 | # |
| 253 | # reed solomon support is select'ed if needed |
| 254 | # |
| 255 | config REED_SOLOMON |
| 256 | tristate |
| 257 | |
| 258 | config REED_SOLOMON_ENC8 |
| 259 | bool |
| 260 | |
| 261 | config REED_SOLOMON_DEC8 |
| 262 | bool |
| 263 | |
| 264 | config REED_SOLOMON_ENC16 |
| 265 | bool |
| 266 | |
| 267 | config REED_SOLOMON_DEC16 |
| 268 | bool |
| 269 | |
| 270 | # |
| 271 | # BCH support is selected if needed |
| 272 | # |
| 273 | config BCH |
| 274 | tristate |
| 275 | select BITREVERSE |
| 276 | |
| 277 | config BCH_CONST_PARAMS |
| 278 | bool |
| 279 | help |
| 280 | Drivers may select this option to force specific constant |
| 281 | values for parameters 'm' (Galois field order) and 't' |
| 282 | (error correction capability). Those specific values must |
| 283 | be set by declaring default values for symbols BCH_CONST_M |
| 284 | and BCH_CONST_T. |
| 285 | Doing so will enable extra compiler optimizations, |
| 286 | improving encoding and decoding performance up to 2x for |
| 287 | usual (m,t) values (typically such that m*t < 200). |
| 288 | When this option is selected, the BCH library supports |
| 289 | only a single (m,t) configuration. This is mainly useful |
| 290 | for NAND flash board drivers requiring known, fixed BCH |
| 291 | parameters. |
| 292 | |
| 293 | config BCH_CONST_M |
| 294 | int |
| 295 | range 5 15 |
| 296 | help |
| 297 | Constant value for Galois field order 'm'. If 'k' is the |
| 298 | number of data bits to protect, 'm' should be chosen such |
| 299 | that (k + m*t) <= 2**m - 1. |
| 300 | Drivers should declare a default value for this symbol if |
| 301 | they select option BCH_CONST_PARAMS. |
| 302 | |
| 303 | config BCH_CONST_T |
| 304 | int |
| 305 | help |
| 306 | Constant value for error correction capability in bits 't'. |
| 307 | Drivers should declare a default value for this symbol if |
| 308 | they select option BCH_CONST_PARAMS. |
| 309 | |
| 310 | # |
| 311 | # Textsearch support is select'ed if needed |
| 312 | # |
| 313 | config TEXTSEARCH |
| 314 | bool |
| 315 | |
| 316 | config TEXTSEARCH_KMP |
| 317 | tristate |
| 318 | |
| 319 | config TEXTSEARCH_BM |
| 320 | tristate |
| 321 | |
| 322 | config TEXTSEARCH_FSM |
| 323 | tristate |
| 324 | |
| 325 | config BTREE |
| 326 | bool |
| 327 | |
| 328 | config INTERVAL_TREE |
| 329 | bool |
| 330 | help |
| 331 | Simple, embeddable, interval-tree. Can find the start of an |
| 332 | overlapping range in log(n) time and then iterate over all |
| 333 | overlapping nodes. The algorithm is implemented as an |
| 334 | augmented rbtree. |
| 335 | |
| 336 | See: |
| 337 | |
| 338 | Documentation/core-api/rbtree.rst |
| 339 | |
| 340 | for more information. |
| 341 | |
| 342 | config INTERVAL_TREE_SPAN_ITER |
| 343 | bool |
| 344 | depends on INTERVAL_TREE |
| 345 | |
| 346 | config XARRAY_MULTI |
| 347 | bool |
| 348 | help |
| 349 | Support entries which occupy multiple consecutive indices in the |
| 350 | XArray. |
| 351 | |
| 352 | config ASSOCIATIVE_ARRAY |
| 353 | bool |
| 354 | help |
| 355 | Generic associative array. Can be searched and iterated over whilst |
| 356 | it is being modified. It is also reasonably quick to search and |
| 357 | modify. The algorithms are non-recursive, and the trees are highly |
| 358 | capacious. |
| 359 | |
| 360 | See: |
| 361 | |
| 362 | Documentation/core-api/assoc_array.rst |
| 363 | |
| 364 | for more information. |
| 365 | |
| 366 | config CLOSURES |
| 367 | bool |
| 368 | |
| 369 | config HAS_IOMEM |
| 370 | bool |
| 371 | depends on !NO_IOMEM |
| 372 | default y |
| 373 | |
| 374 | config HAS_IOPORT |
| 375 | bool |
| 376 | |
| 377 | config HAS_IOPORT_MAP |
| 378 | bool |
| 379 | depends on HAS_IOMEM && !NO_IOPORT_MAP |
| 380 | default y |
| 381 | |
| 382 | source "kernel/dma/Kconfig" |
| 383 | |
| 384 | config SGL_ALLOC |
| 385 | bool |
| 386 | default n |
| 387 | |
| 388 | config IOMMU_HELPER |
| 389 | bool |
| 390 | |
| 391 | config CHECK_SIGNATURE |
| 392 | bool |
| 393 | |
| 394 | config CPUMASK_OFFSTACK |
| 395 | bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS |
| 396 | help |
| 397 | Use dynamic allocation for cpumask_var_t, instead of putting |
| 398 | them on the stack. This is a bit more expensive, but avoids |
| 399 | stack overflow. |
| 400 | |
| 401 | config FORCE_NR_CPUS |
| 402 | def_bool !SMP |
| 403 | |
| 404 | config CPU_RMAP |
| 405 | bool |
| 406 | depends on SMP |
| 407 | |
| 408 | config DQL |
| 409 | bool |
| 410 | |
| 411 | config GLOB |
| 412 | bool |
| 413 | # This actually supports modular compilation, but the module overhead |
| 414 | # is ridiculous for the amount of code involved. Until an out-of-tree |
| 415 | # driver asks for it, we'll just link it directly it into the kernel |
| 416 | # when required. Since we're ignoring out-of-tree users, there's also |
| 417 | # no need bother prompting for a manual decision: |
| 418 | # prompt "glob_match() function" |
| 419 | help |
| 420 | This option provides a glob_match function for performing |
| 421 | simple text pattern matching. It originated in the ATA code |
| 422 | to blacklist particular drive models, but other device drivers |
| 423 | may need similar functionality. |
| 424 | |
| 425 | All drivers in the Linux kernel tree that require this function |
| 426 | should automatically select this option. Say N unless you |
| 427 | are compiling an out-of tree driver which tells you that it |
| 428 | depends on this. |
| 429 | |
| 430 | # |
| 431 | # Netlink attribute parsing support is select'ed if needed |
| 432 | # |
| 433 | config NLATTR |
| 434 | bool |
| 435 | |
| 436 | # |
| 437 | # Generic 64-bit atomic support is selected if needed |
| 438 | # |
| 439 | config GENERIC_ATOMIC64 |
| 440 | bool |
| 441 | |
| 442 | config LRU_CACHE |
| 443 | tristate |
| 444 | |
| 445 | config CLZ_TAB |
| 446 | bool |
| 447 | |
| 448 | config IRQ_POLL |
| 449 | bool "IRQ polling library" |
| 450 | help |
| 451 | Helper library to poll interrupt mitigation using polling. |
| 452 | |
| 453 | config MPILIB |
| 454 | tristate |
| 455 | select CLZ_TAB |
| 456 | help |
| 457 | Multiprecision maths library from GnuPG. |
| 458 | It is used to implement RSA digital signature verification, |
| 459 | which is used by IMA/EVM digital signature extension. |
| 460 | |
| 461 | config SIGNATURE |
| 462 | tristate |
| 463 | depends on KEYS |
| 464 | select CRYPTO_LIB_SHA1 |
| 465 | select MPILIB |
| 466 | help |
| 467 | Digital signature verification. Currently only RSA is supported. |
| 468 | Implementation is done using GnuPG MPI library |
| 469 | |
| 470 | config DIMLIB |
| 471 | tristate |
| 472 | depends on NET |
| 473 | help |
| 474 | Dynamic Interrupt Moderation library. |
| 475 | Implements an algorithm for dynamically changing CQ moderation values |
| 476 | according to run time performance. |
| 477 | |
| 478 | # |
| 479 | # libfdt files, only selected if needed. |
| 480 | # |
| 481 | config LIBFDT |
| 482 | bool |
| 483 | |
| 484 | config OID_REGISTRY |
| 485 | tristate |
| 486 | help |
| 487 | Enable fast lookup object identifier registry. |
| 488 | |
| 489 | config UCS2_STRING |
| 490 | tristate |
| 491 | |
| 492 | # |
| 493 | # generic vdso |
| 494 | # |
| 495 | source "lib/vdso/Kconfig" |
| 496 | |
| 497 | source "lib/fonts/Kconfig" |
| 498 | |
| 499 | config SG_SPLIT |
| 500 | def_bool n |
| 501 | help |
| 502 | Provides a helper to split scatterlists into chunks, each chunk being |
| 503 | a scatterlist. This should be selected by a driver or an API which |
| 504 | whishes to split a scatterlist amongst multiple DMA channels. |
| 505 | |
| 506 | config SG_POOL |
| 507 | def_bool n |
| 508 | help |
| 509 | Provides a helper to allocate chained scatterlists. This should be |
| 510 | selected by a driver or an API which whishes to allocate chained |
| 511 | scatterlist. |
| 512 | |
| 513 | # |
| 514 | # sg chaining option |
| 515 | # |
| 516 | |
| 517 | config ARCH_NO_SG_CHAIN |
| 518 | def_bool n |
| 519 | |
| 520 | config ARCH_HAS_PMEM_API |
| 521 | bool |
| 522 | |
| 523 | config MEMREGION |
| 524 | bool |
| 525 | |
| 526 | config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION |
| 527 | bool |
| 528 | |
| 529 | config GENERIC_CPU_CACHE_MAINTENANCE |
| 530 | bool |
| 531 | |
| 532 | config ARCH_HAS_MEMREMAP_COMPAT_ALIGN |
| 533 | bool |
| 534 | |
| 535 | # use memcpy to implement user copies for nommu architectures |
| 536 | config UACCESS_MEMCPY |
| 537 | bool |
| 538 | |
| 539 | config ARCH_HAS_UACCESS_FLUSHCACHE |
| 540 | bool |
| 541 | |
| 542 | # arch has a concept of a recoverable synchronous exception due to a |
| 543 | # memory-read error like x86 machine-check or ARM data-abort, and |
| 544 | # implements copy_mc_to_{user,kernel} to abort and report |
| 545 | # 'bytes-transferred' if that exception fires when accessing the source |
| 546 | # buffer. |
| 547 | config ARCH_HAS_COPY_MC |
| 548 | bool |
| 549 | |
| 550 | # Temporary. Goes away when all archs are cleaned up |
| 551 | config ARCH_STACKWALK |
| 552 | bool |
| 553 | |
| 554 | config STACKDEPOT |
| 555 | bool |
| 556 | select STACKTRACE |
| 557 | help |
| 558 | Stack depot: stack trace storage that avoids duplication |
| 559 | |
| 560 | config STACKDEPOT_ALWAYS_INIT |
| 561 | bool |
| 562 | select STACKDEPOT |
| 563 | help |
| 564 | Always initialize stack depot during early boot |
| 565 | |
| 566 | config STACKDEPOT_MAX_FRAMES |
| 567 | int "Maximum number of frames in trace saved in stack depot" |
| 568 | range 1 256 |
| 569 | default 64 |
| 570 | depends on STACKDEPOT |
| 571 | |
| 572 | config REF_TRACKER |
| 573 | bool |
| 574 | depends on STACKTRACE_SUPPORT |
| 575 | select STACKDEPOT |
| 576 | |
| 577 | config SBITMAP |
| 578 | bool |
| 579 | |
| 580 | config PARMAN |
| 581 | tristate "parman" if COMPILE_TEST |
| 582 | |
| 583 | config OBJAGG |
| 584 | tristate "objagg" if COMPILE_TEST |
| 585 | |
| 586 | config LWQ_TEST |
| 587 | bool "Boot-time test for lwq queuing" |
| 588 | help |
| 589 | Run boot-time test of light-weight queuing. |
| 590 | |
| 591 | endmenu |
| 592 | |
| 593 | config GENERIC_IOREMAP |
| 594 | bool |
| 595 | |
| 596 | config GENERIC_LIB_ASHLDI3 |
| 597 | bool |
| 598 | |
| 599 | config GENERIC_LIB_ASHRDI3 |
| 600 | bool |
| 601 | |
| 602 | config GENERIC_LIB_LSHRDI3 |
| 603 | bool |
| 604 | |
| 605 | config GENERIC_LIB_MULDI3 |
| 606 | bool |
| 607 | |
| 608 | config GENERIC_LIB_CMPDI2 |
| 609 | bool |
| 610 | |
| 611 | config GENERIC_LIB_UCMPDI2 |
| 612 | bool |
| 613 | |
| 614 | config GENERIC_LIB_DEVMEM_IS_ALLOWED |
| 615 | bool |
| 616 | |
| 617 | config PLDMFW |
| 618 | bool |
| 619 | select CRC32 |
| 620 | default n |
| 621 | |
| 622 | config ASN1_ENCODER |
| 623 | tristate |
| 624 | |
| 625 | config FIRMWARE_TABLE |
| 626 | bool |
| 627 | |
| 628 | config UNION_FIND |
| 629 | bool |
| 630 | |
| 631 | config MIN_HEAP |
| 632 | bool |