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 CRYPTO 314 select CRYPTO_CRC32C 315 help 316 This option is provided for the case where no in-kernel-tree 317 modules require CRC32c functions, but a module built outside the 318 kernel tree does. Such modules that use library CRC32c functions 319 require M here. See Castagnoli93. 320 Module will be libcrc32c. 321 322config CRC8 323 tristate "CRC8 function" 324 help 325 This option provides CRC8 function. Drivers may select this 326 when they need to do cyclic redundancy check according CRC8 327 algorithm. Module will be called crc8. 328 329config XXHASH 330 tristate 331 332config AUDIT_GENERIC 333 bool 334 depends on AUDIT && !AUDIT_ARCH 335 default y 336 337config AUDIT_ARCH_COMPAT_GENERIC 338 bool 339 default n 340 341config AUDIT_COMPAT_GENERIC 342 bool 343 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT 344 default y 345 346config RANDOM32_SELFTEST 347 bool "PRNG perform self test on init" 348 help 349 This option enables the 32 bit PRNG library functions to perform a 350 self test on initialization. 351 352# 353# compression support is select'ed if needed 354# 355config 842_COMPRESS 356 select CRC32 357 tristate 358 359config 842_DECOMPRESS 360 select CRC32 361 tristate 362 363config ZLIB_INFLATE 364 tristate 365 366config ZLIB_DEFLATE 367 tristate 368 select BITREVERSE 369 370config ZLIB_DFLTCC 371 def_bool y 372 depends on S390 373 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib" 374 help 375 Enable s390x hardware support for zlib in the kernel. 376 377config LZO_COMPRESS 378 tristate 379 380config LZO_DECOMPRESS 381 tristate 382 383config LZ4_COMPRESS 384 tristate 385 386config LZ4HC_COMPRESS 387 tristate 388 389config LZ4_DECOMPRESS 390 tristate 391 392config ZSTD_COMMON 393 select XXHASH 394 tristate 395 396config ZSTD_COMPRESS 397 select ZSTD_COMMON 398 tristate 399 400config ZSTD_DECOMPRESS 401 select ZSTD_COMMON 402 tristate 403 404source "lib/xz/Kconfig" 405 406# 407# These all provide a common interface (hence the apparent duplication with 408# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.) 409# 410config DECOMPRESS_GZIP 411 select ZLIB_INFLATE 412 tristate 413 414config DECOMPRESS_BZIP2 415 tristate 416 417config DECOMPRESS_LZMA 418 tristate 419 420config DECOMPRESS_XZ 421 select XZ_DEC 422 tristate 423 424config DECOMPRESS_LZO 425 select LZO_DECOMPRESS 426 tristate 427 428config DECOMPRESS_LZ4 429 select LZ4_DECOMPRESS 430 tristate 431 432config DECOMPRESS_ZSTD 433 select ZSTD_DECOMPRESS 434 tristate 435 436# 437# Generic allocator support is selected if needed 438# 439config GENERIC_ALLOCATOR 440 bool 441 442# 443# reed solomon support is select'ed if needed 444# 445config REED_SOLOMON 446 tristate 447 448config REED_SOLOMON_ENC8 449 bool 450 451config REED_SOLOMON_DEC8 452 bool 453 454config REED_SOLOMON_ENC16 455 bool 456 457config REED_SOLOMON_DEC16 458 bool 459 460# 461# BCH support is selected if needed 462# 463config BCH 464 tristate 465 select BITREVERSE 466 467config BCH_CONST_PARAMS 468 bool 469 help 470 Drivers may select this option to force specific constant 471 values for parameters 'm' (Galois field order) and 't' 472 (error correction capability). Those specific values must 473 be set by declaring default values for symbols BCH_CONST_M 474 and BCH_CONST_T. 475 Doing so will enable extra compiler optimizations, 476 improving encoding and decoding performance up to 2x for 477 usual (m,t) values (typically such that m*t < 200). 478 When this option is selected, the BCH library supports 479 only a single (m,t) configuration. This is mainly useful 480 for NAND flash board drivers requiring known, fixed BCH 481 parameters. 482 483config BCH_CONST_M 484 int 485 range 5 15 486 help 487 Constant value for Galois field order 'm'. If 'k' is the 488 number of data bits to protect, 'm' should be chosen such 489 that (k + m*t) <= 2**m - 1. 490 Drivers should declare a default value for this symbol if 491 they select option BCH_CONST_PARAMS. 492 493config BCH_CONST_T 494 int 495 help 496 Constant value for error correction capability in bits 't'. 497 Drivers should declare a default value for this symbol if 498 they select option BCH_CONST_PARAMS. 499 500# 501# Textsearch support is select'ed if needed 502# 503config TEXTSEARCH 504 bool 505 506config TEXTSEARCH_KMP 507 tristate 508 509config TEXTSEARCH_BM 510 tristate 511 512config TEXTSEARCH_FSM 513 tristate 514 515config BTREE 516 bool 517 518config INTERVAL_TREE 519 bool 520 help 521 Simple, embeddable, interval-tree. Can find the start of an 522 overlapping range in log(n) time and then iterate over all 523 overlapping nodes. The algorithm is implemented as an 524 augmented rbtree. 525 526 See: 527 528 Documentation/core-api/rbtree.rst 529 530 for more information. 531 532config INTERVAL_TREE_SPAN_ITER 533 bool 534 depends on INTERVAL_TREE 535 536config XARRAY_MULTI 537 bool 538 help 539 Support entries which occupy multiple consecutive indices in the 540 XArray. 541 542config ASSOCIATIVE_ARRAY 543 bool 544 help 545 Generic associative array. Can be searched and iterated over whilst 546 it is being modified. It is also reasonably quick to search and 547 modify. The algorithms are non-recursive, and the trees are highly 548 capacious. 549 550 See: 551 552 Documentation/core-api/assoc_array.rst 553 554 for more information. 555 556config CLOSURES 557 bool 558 559config HAS_IOMEM 560 bool 561 depends on !NO_IOMEM 562 default y 563 564config HAS_IOPORT 565 bool 566 567config HAS_IOPORT_MAP 568 bool 569 depends on HAS_IOMEM && !NO_IOPORT_MAP 570 default y 571 572source "kernel/dma/Kconfig" 573 574config SGL_ALLOC 575 bool 576 default n 577 578config IOMMU_HELPER 579 bool 580 581config CHECK_SIGNATURE 582 bool 583 584config CPUMASK_OFFSTACK 585 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS 586 help 587 Use dynamic allocation for cpumask_var_t, instead of putting 588 them on the stack. This is a bit more expensive, but avoids 589 stack overflow. 590 591config FORCE_NR_CPUS 592 def_bool !SMP 593 594config CPU_RMAP 595 bool 596 depends on SMP 597 598config DQL 599 bool 600 601config GLOB 602 bool 603# This actually supports modular compilation, but the module overhead 604# is ridiculous for the amount of code involved. Until an out-of-tree 605# driver asks for it, we'll just link it directly it into the kernel 606# when required. Since we're ignoring out-of-tree users, there's also 607# no need bother prompting for a manual decision: 608# prompt "glob_match() function" 609 help 610 This option provides a glob_match function for performing 611 simple text pattern matching. It originated in the ATA code 612 to blacklist particular drive models, but other device drivers 613 may need similar functionality. 614 615 All drivers in the Linux kernel tree that require this function 616 should automatically select this option. Say N unless you 617 are compiling an out-of tree driver which tells you that it 618 depends on this. 619 620config GLOB_SELFTEST 621 tristate "glob self-test on init" 622 depends on GLOB 623 help 624 This option enables a simple self-test of the glob_match 625 function on startup. It is primarily useful for people 626 working on the code to ensure they haven't introduced any 627 regressions. 628 629 It only adds a little bit of code and slows kernel boot (or 630 module load) by a small amount, so you're welcome to play with 631 it, but you probably don't need it. 632 633# 634# Netlink attribute parsing support is select'ed if needed 635# 636config NLATTR 637 bool 638 639# 640# Generic 64-bit atomic support is selected if needed 641# 642config GENERIC_ATOMIC64 643 bool 644 645config LRU_CACHE 646 tristate 647 648config CLZ_TAB 649 bool 650 651config IRQ_POLL 652 bool "IRQ polling library" 653 help 654 Helper library to poll interrupt mitigation using polling. 655 656config MPILIB 657 tristate 658 select CLZ_TAB 659 help 660 Multiprecision maths library from GnuPG. 661 It is used to implement RSA digital signature verification, 662 which is used by IMA/EVM digital signature extension. 663 664config SIGNATURE 665 tristate 666 depends on KEYS 667 select CRYPTO 668 select CRYPTO_SHA1 669 select MPILIB 670 help 671 Digital signature verification. Currently only RSA is supported. 672 Implementation is done using GnuPG MPI library 673 674config DIMLIB 675 tristate 676 depends on NET 677 help 678 Dynamic Interrupt Moderation library. 679 Implements an algorithm for dynamically changing CQ moderation values 680 according to run time performance. 681 682# 683# libfdt files, only selected if needed. 684# 685config LIBFDT 686 bool 687 688config OID_REGISTRY 689 tristate 690 help 691 Enable fast lookup object identifier registry. 692 693config UCS2_STRING 694 tristate 695 696# 697# generic vdso 698# 699source "lib/vdso/Kconfig" 700 701source "lib/fonts/Kconfig" 702 703config SG_SPLIT 704 def_bool n 705 help 706 Provides a helper to split scatterlists into chunks, each chunk being 707 a scatterlist. This should be selected by a driver or an API which 708 whishes to split a scatterlist amongst multiple DMA channels. 709 710config SG_POOL 711 def_bool n 712 help 713 Provides a helper to allocate chained scatterlists. This should be 714 selected by a driver or an API which whishes to allocate chained 715 scatterlist. 716 717# 718# sg chaining option 719# 720 721config ARCH_NO_SG_CHAIN 722 def_bool n 723 724config ARCH_HAS_PMEM_API 725 bool 726 727config MEMREGION 728 bool 729 730config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION 731 bool 732 733config ARCH_HAS_MEMREMAP_COMPAT_ALIGN 734 bool 735 736# use memcpy to implement user copies for nommu architectures 737config UACCESS_MEMCPY 738 bool 739 740config ARCH_HAS_UACCESS_FLUSHCACHE 741 bool 742 743# arch has a concept of a recoverable synchronous exception due to a 744# memory-read error like x86 machine-check or ARM data-abort, and 745# implements copy_mc_to_{user,kernel} to abort and report 746# 'bytes-transferred' if that exception fires when accessing the source 747# buffer. 748config ARCH_HAS_COPY_MC 749 bool 750 751# Temporary. Goes away when all archs are cleaned up 752config ARCH_STACKWALK 753 bool 754 755config STACKDEPOT 756 bool 757 select STACKTRACE 758 help 759 Stack depot: stack trace storage that avoids duplication 760 761config STACKDEPOT_ALWAYS_INIT 762 bool 763 select STACKDEPOT 764 help 765 Always initialize stack depot during early boot 766 767config STACKDEPOT_MAX_FRAMES 768 int "Maximum number of frames in trace saved in stack depot" 769 range 1 256 770 default 64 771 depends on STACKDEPOT 772 773config REF_TRACKER 774 bool 775 depends on STACKTRACE_SUPPORT 776 select STACKDEPOT 777 778config SBITMAP 779 bool 780 781config PARMAN 782 tristate "parman" if COMPILE_TEST 783 784config OBJAGG 785 tristate "objagg" if COMPILE_TEST 786 787config LWQ_TEST 788 bool "Boot-time test for lwq queuing" 789 help 790 Run boot-time test of light-weight queuing. 791 792endmenu 793 794config GENERIC_IOREMAP 795 bool 796 797config GENERIC_LIB_ASHLDI3 798 bool 799 800config GENERIC_LIB_ASHRDI3 801 bool 802 803config GENERIC_LIB_LSHRDI3 804 bool 805 806config GENERIC_LIB_MULDI3 807 bool 808 809config GENERIC_LIB_CMPDI2 810 bool 811 812config GENERIC_LIB_UCMPDI2 813 bool 814 815config GENERIC_LIB_DEVMEM_IS_ALLOWED 816 bool 817 818config PLDMFW 819 bool 820 default n 821 822config ASN1_ENCODER 823 tristate 824 825config POLYNOMIAL 826 tristate 827 828config FIRMWARE_TABLE 829 bool 830 831config UNION_FIND 832 bool 833 834config MIN_HEAP 835 bool 836