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