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