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