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