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