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 CRC64_ROCKSOFT 172 tristate "CRC calculation for the Rocksoft model CRC64" 173 select CRC64 174 select CRYPTO 175 select CRYPTO_CRC64_ROCKSOFT 176 help 177 This option provides a CRC64 API to a registered crypto driver. 178 This is used with the block layer's data integrity subsystem. 179 180config CRC_ITU_T 181 tristate "CRC ITU-T V.41 functions" 182 help 183 This option is provided for the case where no in-kernel-tree 184 modules require CRC ITU-T V.41 functions, but a module built outside 185 the kernel tree does. Such modules that use library CRC ITU-T V.41 186 functions require M here. 187 188config CRC32 189 tristate "CRC32/CRC32c functions" 190 default y 191 select BITREVERSE 192 select CRC32_SARWATE 193 help 194 This option is provided for the case where no in-kernel-tree 195 modules require CRC32/CRC32c functions, but a module built outside 196 the kernel tree does. Such modules that use library CRC32/CRC32c 197 functions require M here. 198 199config ARCH_HAS_CRC32 200 bool 201 202config CRC32_ARCH 203 tristate 204 default CRC32 if ARCH_HAS_CRC32 && CRC_OPTIMIZATIONS 205 206config CRC32_SARWATE 207 bool 208 209config CRC64 210 tristate "CRC64 functions" 211 help 212 This option is provided for the case where no in-kernel-tree 213 modules require CRC64 functions, but a module built outside 214 the kernel tree does. Such modules that use library CRC64 215 functions require M here. 216 217config CRC4 218 tristate "CRC4 functions" 219 help 220 This option is provided for the case where no in-kernel-tree 221 modules require CRC4 functions, but a module built outside 222 the kernel tree does. Such modules that use library CRC4 223 functions require M here. 224 225config CRC7 226 tristate "CRC7 functions" 227 help 228 This option is provided for the case where no in-kernel-tree 229 modules require CRC7 functions, but a module built outside 230 the kernel tree does. Such modules that use library CRC7 231 functions require M here. 232 233config LIBCRC32C 234 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check" 235 select CRC32 236 help 237 This option just selects CRC32 and is provided for compatibility 238 purposes until the users are updated to select CRC32 directly. 239 240config CRC8 241 tristate "CRC8 function" 242 help 243 This option provides CRC8 function. Drivers may select this 244 when they need to do cyclic redundancy check according CRC8 245 algorithm. Module will be called crc8. 246 247config CRC_OPTIMIZATIONS 248 bool "Enable optimized CRC implementations" if EXPERT 249 default y 250 help 251 Disabling this option reduces code size slightly by disabling the 252 architecture-optimized implementations of any CRC variants that are 253 enabled. CRC checksumming performance may get much slower. 254 255 Keep this enabled unless you're really trying to minimize the size of 256 the kernel. 257 258config XXHASH 259 tristate 260 261config AUDIT_GENERIC 262 bool 263 depends on AUDIT && !AUDIT_ARCH 264 default y 265 266config AUDIT_ARCH_COMPAT_GENERIC 267 bool 268 default n 269 270config AUDIT_COMPAT_GENERIC 271 bool 272 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT 273 default y 274 275config RANDOM32_SELFTEST 276 bool "PRNG perform self test on init" 277 help 278 This option enables the 32 bit PRNG library functions to perform a 279 self test on initialization. 280 281# 282# compression support is select'ed if needed 283# 284config 842_COMPRESS 285 select CRC32 286 tristate 287 288config 842_DECOMPRESS 289 select CRC32 290 tristate 291 292config ZLIB_INFLATE 293 tristate 294 295config ZLIB_DEFLATE 296 tristate 297 select BITREVERSE 298 299config ZLIB_DFLTCC 300 def_bool y 301 depends on S390 302 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib" 303 help 304 Enable s390x hardware support for zlib in the kernel. 305 306config LZO_COMPRESS 307 tristate 308 309config LZO_DECOMPRESS 310 tristate 311 312config LZ4_COMPRESS 313 tristate 314 315config LZ4HC_COMPRESS 316 tristate 317 318config LZ4_DECOMPRESS 319 tristate 320 321config ZSTD_COMMON 322 select XXHASH 323 tristate 324 325config ZSTD_COMPRESS 326 select ZSTD_COMMON 327 tristate 328 329config ZSTD_DECOMPRESS 330 select ZSTD_COMMON 331 tristate 332 333source "lib/xz/Kconfig" 334 335# 336# These all provide a common interface (hence the apparent duplication with 337# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.) 338# 339config DECOMPRESS_GZIP 340 select ZLIB_INFLATE 341 tristate 342 343config DECOMPRESS_BZIP2 344 tristate 345 346config DECOMPRESS_LZMA 347 tristate 348 349config DECOMPRESS_XZ 350 select XZ_DEC 351 tristate 352 353config DECOMPRESS_LZO 354 select LZO_DECOMPRESS 355 tristate 356 357config DECOMPRESS_LZ4 358 select LZ4_DECOMPRESS 359 tristate 360 361config DECOMPRESS_ZSTD 362 select ZSTD_DECOMPRESS 363 tristate 364 365# 366# Generic allocator support is selected if needed 367# 368config GENERIC_ALLOCATOR 369 bool 370 371# 372# reed solomon support is select'ed if needed 373# 374config REED_SOLOMON 375 tristate 376 377config REED_SOLOMON_ENC8 378 bool 379 380config REED_SOLOMON_DEC8 381 bool 382 383config REED_SOLOMON_ENC16 384 bool 385 386config REED_SOLOMON_DEC16 387 bool 388 389# 390# BCH support is selected if needed 391# 392config BCH 393 tristate 394 select BITREVERSE 395 396config BCH_CONST_PARAMS 397 bool 398 help 399 Drivers may select this option to force specific constant 400 values for parameters 'm' (Galois field order) and 't' 401 (error correction capability). Those specific values must 402 be set by declaring default values for symbols BCH_CONST_M 403 and BCH_CONST_T. 404 Doing so will enable extra compiler optimizations, 405 improving encoding and decoding performance up to 2x for 406 usual (m,t) values (typically such that m*t < 200). 407 When this option is selected, the BCH library supports 408 only a single (m,t) configuration. This is mainly useful 409 for NAND flash board drivers requiring known, fixed BCH 410 parameters. 411 412config BCH_CONST_M 413 int 414 range 5 15 415 help 416 Constant value for Galois field order 'm'. If 'k' is the 417 number of data bits to protect, 'm' should be chosen such 418 that (k + m*t) <= 2**m - 1. 419 Drivers should declare a default value for this symbol if 420 they select option BCH_CONST_PARAMS. 421 422config BCH_CONST_T 423 int 424 help 425 Constant value for error correction capability in bits 't'. 426 Drivers should declare a default value for this symbol if 427 they select option BCH_CONST_PARAMS. 428 429# 430# Textsearch support is select'ed if needed 431# 432config TEXTSEARCH 433 bool 434 435config TEXTSEARCH_KMP 436 tristate 437 438config TEXTSEARCH_BM 439 tristate 440 441config TEXTSEARCH_FSM 442 tristate 443 444config BTREE 445 bool 446 447config INTERVAL_TREE 448 bool 449 help 450 Simple, embeddable, interval-tree. Can find the start of an 451 overlapping range in log(n) time and then iterate over all 452 overlapping nodes. The algorithm is implemented as an 453 augmented rbtree. 454 455 See: 456 457 Documentation/core-api/rbtree.rst 458 459 for more information. 460 461config INTERVAL_TREE_SPAN_ITER 462 bool 463 depends on INTERVAL_TREE 464 465config XARRAY_MULTI 466 bool 467 help 468 Support entries which occupy multiple consecutive indices in the 469 XArray. 470 471config ASSOCIATIVE_ARRAY 472 bool 473 help 474 Generic associative array. Can be searched and iterated over whilst 475 it is being modified. It is also reasonably quick to search and 476 modify. The algorithms are non-recursive, and the trees are highly 477 capacious. 478 479 See: 480 481 Documentation/core-api/assoc_array.rst 482 483 for more information. 484 485config CLOSURES 486 bool 487 488config HAS_IOMEM 489 bool 490 depends on !NO_IOMEM 491 default y 492 493config HAS_IOPORT 494 bool 495 496config HAS_IOPORT_MAP 497 bool 498 depends on HAS_IOMEM && !NO_IOPORT_MAP 499 default y 500 501source "kernel/dma/Kconfig" 502 503config SGL_ALLOC 504 bool 505 default n 506 507config IOMMU_HELPER 508 bool 509 510config CHECK_SIGNATURE 511 bool 512 513config CPUMASK_OFFSTACK 514 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS 515 help 516 Use dynamic allocation for cpumask_var_t, instead of putting 517 them on the stack. This is a bit more expensive, but avoids 518 stack overflow. 519 520config FORCE_NR_CPUS 521 def_bool !SMP 522 523config CPU_RMAP 524 bool 525 depends on SMP 526 527config DQL 528 bool 529 530config GLOB 531 bool 532# This actually supports modular compilation, but the module overhead 533# is ridiculous for the amount of code involved. Until an out-of-tree 534# driver asks for it, we'll just link it directly it into the kernel 535# when required. Since we're ignoring out-of-tree users, there's also 536# no need bother prompting for a manual decision: 537# prompt "glob_match() function" 538 help 539 This option provides a glob_match function for performing 540 simple text pattern matching. It originated in the ATA code 541 to blacklist particular drive models, but other device drivers 542 may need similar functionality. 543 544 All drivers in the Linux kernel tree that require this function 545 should automatically select this option. Say N unless you 546 are compiling an out-of tree driver which tells you that it 547 depends on this. 548 549config GLOB_SELFTEST 550 tristate "glob self-test on init" 551 depends on GLOB 552 help 553 This option enables a simple self-test of the glob_match 554 function on startup. It is primarily useful for people 555 working on the code to ensure they haven't introduced any 556 regressions. 557 558 It only adds a little bit of code and slows kernel boot (or 559 module load) by a small amount, so you're welcome to play with 560 it, but you probably don't need it. 561 562# 563# Netlink attribute parsing support is select'ed if needed 564# 565config NLATTR 566 bool 567 568# 569# Generic 64-bit atomic support is selected if needed 570# 571config GENERIC_ATOMIC64 572 bool 573 574config LRU_CACHE 575 tristate 576 577config CLZ_TAB 578 bool 579 580config IRQ_POLL 581 bool "IRQ polling library" 582 help 583 Helper library to poll interrupt mitigation using polling. 584 585config MPILIB 586 tristate 587 select CLZ_TAB 588 help 589 Multiprecision maths library from GnuPG. 590 It is used to implement RSA digital signature verification, 591 which is used by IMA/EVM digital signature extension. 592 593config SIGNATURE 594 tristate 595 depends on KEYS 596 select CRYPTO 597 select CRYPTO_SHA1 598 select MPILIB 599 help 600 Digital signature verification. Currently only RSA is supported. 601 Implementation is done using GnuPG MPI library 602 603config DIMLIB 604 tristate 605 depends on NET 606 help 607 Dynamic Interrupt Moderation library. 608 Implements an algorithm for dynamically changing CQ moderation values 609 according to run time performance. 610 611# 612# libfdt files, only selected if needed. 613# 614config LIBFDT 615 bool 616 617config OID_REGISTRY 618 tristate 619 help 620 Enable fast lookup object identifier registry. 621 622config UCS2_STRING 623 tristate 624 625# 626# generic vdso 627# 628source "lib/vdso/Kconfig" 629 630source "lib/fonts/Kconfig" 631 632config SG_SPLIT 633 def_bool n 634 help 635 Provides a helper to split scatterlists into chunks, each chunk being 636 a scatterlist. This should be selected by a driver or an API which 637 whishes to split a scatterlist amongst multiple DMA channels. 638 639config SG_POOL 640 def_bool n 641 help 642 Provides a helper to allocate chained scatterlists. This should be 643 selected by a driver or an API which whishes to allocate chained 644 scatterlist. 645 646# 647# sg chaining option 648# 649 650config ARCH_NO_SG_CHAIN 651 def_bool n 652 653config ARCH_HAS_PMEM_API 654 bool 655 656config MEMREGION 657 bool 658 659config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION 660 bool 661 662config ARCH_HAS_MEMREMAP_COMPAT_ALIGN 663 bool 664 665# use memcpy to implement user copies for nommu architectures 666config UACCESS_MEMCPY 667 bool 668 669config ARCH_HAS_UACCESS_FLUSHCACHE 670 bool 671 672# arch has a concept of a recoverable synchronous exception due to a 673# memory-read error like x86 machine-check or ARM data-abort, and 674# implements copy_mc_to_{user,kernel} to abort and report 675# 'bytes-transferred' if that exception fires when accessing the source 676# buffer. 677config ARCH_HAS_COPY_MC 678 bool 679 680# Temporary. Goes away when all archs are cleaned up 681config ARCH_STACKWALK 682 bool 683 684config STACKDEPOT 685 bool 686 select STACKTRACE 687 help 688 Stack depot: stack trace storage that avoids duplication 689 690config STACKDEPOT_ALWAYS_INIT 691 bool 692 select STACKDEPOT 693 help 694 Always initialize stack depot during early boot 695 696config STACKDEPOT_MAX_FRAMES 697 int "Maximum number of frames in trace saved in stack depot" 698 range 1 256 699 default 64 700 depends on STACKDEPOT 701 702config REF_TRACKER 703 bool 704 depends on STACKTRACE_SUPPORT 705 select STACKDEPOT 706 707config SBITMAP 708 bool 709 710config PARMAN 711 tristate "parman" if COMPILE_TEST 712 713config OBJAGG 714 tristate "objagg" if COMPILE_TEST 715 716config LWQ_TEST 717 bool "Boot-time test for lwq queuing" 718 help 719 Run boot-time test of light-weight queuing. 720 721endmenu 722 723config GENERIC_IOREMAP 724 bool 725 726config GENERIC_LIB_ASHLDI3 727 bool 728 729config GENERIC_LIB_ASHRDI3 730 bool 731 732config GENERIC_LIB_LSHRDI3 733 bool 734 735config GENERIC_LIB_MULDI3 736 bool 737 738config GENERIC_LIB_CMPDI2 739 bool 740 741config GENERIC_LIB_UCMPDI2 742 bool 743 744config GENERIC_LIB_DEVMEM_IS_ALLOWED 745 bool 746 747config PLDMFW 748 bool 749 default n 750 751config ASN1_ENCODER 752 tristate 753 754config POLYNOMIAL 755 tristate 756 757config FIRMWARE_TABLE 758 bool 759 760config UNION_FIND 761 bool 762 763config MIN_HEAP 764 bool 765