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