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 default n 28 help 29 This option provides the packing() helper function, which permits 30 converting bitfields between a CPU-usable representation and a 31 memory representation that can have any combination of these quirks: 32 - Is little endian (bytes are reversed within a 32-bit group) 33 - The least-significant 32-bit word comes first (within a 64-bit 34 group) 35 - The most significant bit of a byte is at its right (bit 0 of a 36 register description is numerically 2^7). 37 Drivers may use these helpers to match the bit indices as described 38 in the data sheets of the peripherals they are in control of. 39 40 When in doubt, say N. 41 42config BITREVERSE 43 tristate 44 45config HAVE_ARCH_BITREVERSE 46 bool 47 default n 48 help 49 This option enables the use of hardware bit-reversal instructions on 50 architectures which support such operations. 51 52config ARCH_HAS_STRNCPY_FROM_USER 53 bool 54 55config ARCH_HAS_STRNLEN_USER 56 bool 57 58config GENERIC_STRNCPY_FROM_USER 59 def_bool !ARCH_HAS_STRNCPY_FROM_USER 60 61config GENERIC_STRNLEN_USER 62 def_bool !ARCH_HAS_STRNLEN_USER 63 64config GENERIC_NET_UTILS 65 bool 66 67source "lib/math/Kconfig" 68 69config NO_GENERIC_PCI_IOPORT_MAP 70 bool 71 72config GENERIC_PCI_IOMAP 73 bool 74 75config GENERIC_IOMAP 76 bool 77 select GENERIC_PCI_IOMAP 78 79config STMP_DEVICE 80 bool 81 82config ARCH_USE_CMPXCHG_LOCKREF 83 bool 84 85config ARCH_HAS_FAST_MULTIPLIER 86 bool 87 88config ARCH_USE_SYM_ANNOTATIONS 89 bool 90 91config INDIRECT_PIO 92 bool "Access I/O in non-MMIO mode" 93 depends on ARM64 94 help 95 On some platforms where no separate I/O space exists, there are I/O 96 hosts which can not be accessed in MMIO mode. Using the logical PIO 97 mechanism, the host-local I/O resource can be mapped into system 98 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the 99 system can access the I/O devices with the mapped-logic PIO through 100 I/O accessors. 101 102 This way has relatively little I/O performance cost. Please make 103 sure your devices really need this configure item enabled. 104 105 When in doubt, say N. 106 107config INDIRECT_IOMEM 108 bool 109 help 110 This is selected by other options/architectures to provide the 111 emulated iomem accessors. 112 113config INDIRECT_IOMEM_FALLBACK 114 bool 115 depends on INDIRECT_IOMEM 116 help 117 If INDIRECT_IOMEM is selected, this enables falling back to plain 118 mmio accesses when the IO memory address is not a registered 119 emulated region. 120 121config TRACE_MMIO_ACCESS 122 bool "Register read/write tracing" 123 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS 124 help 125 Create tracepoints for MMIO read/write operations. These trace events 126 can be used for logging all MMIO read/write operations. 127 128source "lib/crypto/Kconfig" 129 130config CRC_CCITT 131 tristate "CRC-CCITT functions" 132 help 133 This option is provided for the case where no in-kernel-tree 134 modules require CRC-CCITT functions, but a module built outside 135 the kernel tree does. Such modules that use library CRC-CCITT 136 functions require M here. 137 138config CRC16 139 tristate "CRC16 functions" 140 help 141 This option is provided for the case where no in-kernel-tree 142 modules require CRC16 functions, but a module built outside 143 the kernel tree does. Such modules that use library CRC16 144 functions require M here. 145 146config CRC_T10DIF 147 tristate "CRC calculation for the T10 Data Integrity Field" 148 select CRYPTO 149 select CRYPTO_CRCT10DIF 150 help 151 This option is only needed if a module that's not in the 152 kernel tree needs to calculate CRC checks for use with the 153 SCSI data integrity subsystem. 154 155config CRC64_ROCKSOFT 156 tristate "CRC calculation for the Rocksoft model CRC64" 157 select CRC64 158 select CRYPTO 159 select CRYPTO_CRC64_ROCKSOFT 160 help 161 This option provides a CRC64 API to a registered crypto driver. 162 This is used with the block layer's data integrity subsystem. 163 164config CRC_ITU_T 165 tristate "CRC ITU-T V.41 functions" 166 help 167 This option is provided for the case where no in-kernel-tree 168 modules require CRC ITU-T V.41 functions, but a module built outside 169 the kernel tree does. Such modules that use library CRC ITU-T V.41 170 functions require M here. 171 172config CRC32 173 tristate "CRC32/CRC32c functions" 174 default y 175 select BITREVERSE 176 help 177 This option is provided for the case where no in-kernel-tree 178 modules require CRC32/CRC32c functions, but a module built outside 179 the kernel tree does. Such modules that use library CRC32/CRC32c 180 functions require M here. 181 182config CRC32_SELFTEST 183 tristate "CRC32 perform self test on init" 184 depends on CRC32 185 help 186 This option enables the CRC32 library functions to perform a 187 self test on initialization. The self test computes crc32_le 188 and crc32_be over byte strings with random alignment and length 189 and computes the total elapsed time and number of bytes processed. 190 191choice 192 prompt "CRC32 implementation" 193 depends on CRC32 194 default CRC32_SLICEBY8 195 help 196 This option allows a kernel builder to override the default choice 197 of CRC32 algorithm. Choose the default ("slice by 8") unless you 198 know that you need one of the others. 199 200config CRC32_SLICEBY8 201 bool "Slice by 8 bytes" 202 help 203 Calculate checksum 8 bytes at a time with a clever slicing algorithm. 204 This is the fastest algorithm, but comes with a 8KiB lookup table. 205 Most modern processors have enough cache to hold this table without 206 thrashing the cache. 207 208 This is the default implementation choice. Choose this one unless 209 you have a good reason not to. 210 211config CRC32_SLICEBY4 212 bool "Slice by 4 bytes" 213 help 214 Calculate checksum 4 bytes at a time with a clever slicing algorithm. 215 This is a bit slower than slice by 8, but has a smaller 4KiB lookup 216 table. 217 218 Only choose this option if you know what you are doing. 219 220config CRC32_SARWATE 221 bool "Sarwate's Algorithm (one byte at a time)" 222 help 223 Calculate checksum a byte at a time using Sarwate's algorithm. This 224 is not particularly fast, but has a small 256 byte lookup table. 225 226 Only choose this option if you know what you are doing. 227 228config CRC32_BIT 229 bool "Classic Algorithm (one bit at a time)" 230 help 231 Calculate checksum one bit at a time. This is VERY slow, but has 232 no lookup table. This is provided as a debugging option. 233 234 Only choose this option if you are debugging crc32. 235 236endchoice 237 238config CRC64 239 tristate "CRC64 functions" 240 help 241 This option is provided for the case where no in-kernel-tree 242 modules require CRC64 functions, but a module built outside 243 the kernel tree does. Such modules that use library CRC64 244 functions require M here. 245 246config CRC4 247 tristate "CRC4 functions" 248 help 249 This option is provided for the case where no in-kernel-tree 250 modules require CRC4 functions, but a module built outside 251 the kernel tree does. Such modules that use library CRC4 252 functions require M here. 253 254config CRC7 255 tristate "CRC7 functions" 256 help 257 This option is provided for the case where no in-kernel-tree 258 modules require CRC7 functions, but a module built outside 259 the kernel tree does. Such modules that use library CRC7 260 functions require M here. 261 262config LIBCRC32C 263 tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check" 264 select CRYPTO 265 select CRYPTO_CRC32C 266 help 267 This option is provided for the case where no in-kernel-tree 268 modules require CRC32c functions, but a module built outside the 269 kernel tree does. Such modules that use library CRC32c functions 270 require M here. See Castagnoli93. 271 Module will be libcrc32c. 272 273config CRC8 274 tristate "CRC8 function" 275 help 276 This option provides CRC8 function. Drivers may select this 277 when they need to do cyclic redundancy check according CRC8 278 algorithm. Module will be called crc8. 279 280config XXHASH 281 tristate 282 283config AUDIT_GENERIC 284 bool 285 depends on AUDIT && !AUDIT_ARCH 286 default y 287 288config AUDIT_ARCH_COMPAT_GENERIC 289 bool 290 default n 291 292config AUDIT_COMPAT_GENERIC 293 bool 294 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT 295 default y 296 297config RANDOM32_SELFTEST 298 bool "PRNG perform self test on init" 299 help 300 This option enables the 32 bit PRNG library functions to perform a 301 self test on initialization. 302 303# 304# compression support is select'ed if needed 305# 306config 842_COMPRESS 307 select CRC32 308 tristate 309 310config 842_DECOMPRESS 311 select CRC32 312 tristate 313 314config ZLIB_INFLATE 315 tristate 316 317config ZLIB_DEFLATE 318 tristate 319 select BITREVERSE 320 321config ZLIB_DFLTCC 322 def_bool y 323 depends on S390 324 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib" 325 help 326 Enable s390x hardware support for zlib in the kernel. 327 328config LZO_COMPRESS 329 tristate 330 331config LZO_DECOMPRESS 332 tristate 333 334config LZ4_COMPRESS 335 tristate 336 337config LZ4HC_COMPRESS 338 tristate 339 340config LZ4_DECOMPRESS 341 tristate 342 343config ZSTD_COMPRESS 344 select XXHASH 345 tristate 346 347config ZSTD_DECOMPRESS 348 select XXHASH 349 tristate 350 351source "lib/xz/Kconfig" 352 353# 354# These all provide a common interface (hence the apparent duplication with 355# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.) 356# 357config DECOMPRESS_GZIP 358 select ZLIB_INFLATE 359 tristate 360 361config DECOMPRESS_BZIP2 362 tristate 363 364config DECOMPRESS_LZMA 365 tristate 366 367config DECOMPRESS_XZ 368 select XZ_DEC 369 tristate 370 371config DECOMPRESS_LZO 372 select LZO_DECOMPRESS 373 tristate 374 375config DECOMPRESS_LZ4 376 select LZ4_DECOMPRESS 377 tristate 378 379config DECOMPRESS_ZSTD 380 select ZSTD_DECOMPRESS 381 tristate 382 383# 384# Generic allocator support is selected if needed 385# 386config GENERIC_ALLOCATOR 387 bool 388 389# 390# reed solomon support is select'ed if needed 391# 392config REED_SOLOMON 393 tristate 394 395config REED_SOLOMON_ENC8 396 bool 397 398config REED_SOLOMON_DEC8 399 bool 400 401config REED_SOLOMON_ENC16 402 bool 403 404config REED_SOLOMON_DEC16 405 bool 406 407# 408# BCH support is selected if needed 409# 410config BCH 411 tristate 412 413config BCH_CONST_PARAMS 414 bool 415 help 416 Drivers may select this option to force specific constant 417 values for parameters 'm' (Galois field order) and 't' 418 (error correction capability). Those specific values must 419 be set by declaring default values for symbols BCH_CONST_M 420 and BCH_CONST_T. 421 Doing so will enable extra compiler optimizations, 422 improving encoding and decoding performance up to 2x for 423 usual (m,t) values (typically such that m*t < 200). 424 When this option is selected, the BCH library supports 425 only a single (m,t) configuration. This is mainly useful 426 for NAND flash board drivers requiring known, fixed BCH 427 parameters. 428 429config BCH_CONST_M 430 int 431 range 5 15 432 help 433 Constant value for Galois field order 'm'. If 'k' is the 434 number of data bits to protect, 'm' should be chosen such 435 that (k + m*t) <= 2**m - 1. 436 Drivers should declare a default value for this symbol if 437 they select option BCH_CONST_PARAMS. 438 439config BCH_CONST_T 440 int 441 help 442 Constant value for error correction capability in bits 't'. 443 Drivers should declare a default value for this symbol if 444 they select option BCH_CONST_PARAMS. 445 446# 447# Textsearch support is select'ed if needed 448# 449config TEXTSEARCH 450 bool 451 452config TEXTSEARCH_KMP 453 tristate 454 455config TEXTSEARCH_BM 456 tristate 457 458config TEXTSEARCH_FSM 459 tristate 460 461config BTREE 462 bool 463 464config INTERVAL_TREE 465 bool 466 help 467 Simple, embeddable, interval-tree. Can find the start of an 468 overlapping range in log(n) time and then iterate over all 469 overlapping nodes. The algorithm is implemented as an 470 augmented rbtree. 471 472 See: 473 474 Documentation/core-api/rbtree.rst 475 476 for more information. 477 478config XARRAY_MULTI 479 bool 480 help 481 Support entries which occupy multiple consecutive indices in the 482 XArray. 483 484config ASSOCIATIVE_ARRAY 485 bool 486 help 487 Generic associative array. Can be searched and iterated over whilst 488 it is being modified. It is also reasonably quick to search and 489 modify. The algorithms are non-recursive, and the trees are highly 490 capacious. 491 492 See: 493 494 Documentation/core-api/assoc_array.rst 495 496 for more information. 497 498config HAS_IOMEM 499 bool 500 depends on !NO_IOMEM 501 default y 502 503config HAS_IOPORT_MAP 504 bool 505 depends on HAS_IOMEM && !NO_IOPORT_MAP 506 default y 507 508source "kernel/dma/Kconfig" 509 510config SGL_ALLOC 511 bool 512 default n 513 514config IOMMU_HELPER 515 bool 516 517config CHECK_SIGNATURE 518 bool 519 520config CPUMASK_OFFSTACK 521 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS 522 help 523 Use dynamic allocation for cpumask_var_t, instead of putting 524 them on the stack. This is a bit more expensive, but avoids 525 stack overflow. 526 527config CPU_RMAP 528 bool 529 depends on SMP 530 531config DQL 532 bool 533 534config GLOB 535 bool 536# This actually supports modular compilation, but the module overhead 537# is ridiculous for the amount of code involved. Until an out-of-tree 538# driver asks for it, we'll just link it directly it into the kernel 539# when required. Since we're ignoring out-of-tree users, there's also 540# no need bother prompting for a manual decision: 541# prompt "glob_match() function" 542 help 543 This option provides a glob_match function for performing 544 simple text pattern matching. It originated in the ATA code 545 to blacklist particular drive models, but other device drivers 546 may need similar functionality. 547 548 All drivers in the Linux kernel tree that require this function 549 should automatically select this option. Say N unless you 550 are compiling an out-of tree driver which tells you that it 551 depends on this. 552 553config GLOB_SELFTEST 554 tristate "glob self-test on init" 555 depends on GLOB 556 help 557 This option enables a simple self-test of the glob_match 558 function on startup. It is primarily useful for people 559 working on the code to ensure they haven't introduced any 560 regressions. 561 562 It only adds a little bit of code and slows kernel boot (or 563 module load) by a small amount, so you're welcome to play with 564 it, but you probably don't need it. 565 566# 567# Netlink attribute parsing support is select'ed if needed 568# 569config NLATTR 570 bool 571 572# 573# Generic 64-bit atomic support is selected if needed 574# 575config GENERIC_ATOMIC64 576 bool 577 578config LRU_CACHE 579 tristate 580 581config CLZ_TAB 582 bool 583 584config IRQ_POLL 585 bool "IRQ polling library" 586 help 587 Helper library to poll interrupt mitigation using polling. 588 589config MPILIB 590 tristate 591 select CLZ_TAB 592 help 593 Multiprecision maths library from GnuPG. 594 It is used to implement RSA digital signature verification, 595 which is used by IMA/EVM digital signature extension. 596 597config SIGNATURE 598 tristate 599 depends on KEYS 600 select CRYPTO 601 select CRYPTO_SHA1 602 select MPILIB 603 help 604 Digital signature verification. Currently only RSA is supported. 605 Implementation is done using GnuPG MPI library 606 607config DIMLIB 608 bool 609 help 610 Dynamic Interrupt Moderation library. 611 Implements an algorithm for dynamically changing CQ moderation values 612 according to run time performance. 613 614# 615# libfdt files, only selected if needed. 616# 617config LIBFDT 618 bool 619 620config OID_REGISTRY 621 tristate 622 help 623 Enable fast lookup object identifier registry. 624 625config UCS2_STRING 626 tristate 627 628# 629# generic vdso 630# 631source "lib/vdso/Kconfig" 632 633source "lib/fonts/Kconfig" 634 635config SG_SPLIT 636 def_bool n 637 help 638 Provides a helper to split scatterlists into chunks, each chunk being 639 a scatterlist. This should be selected by a driver or an API which 640 whishes to split a scatterlist amongst multiple DMA channels. 641 642config SG_POOL 643 def_bool n 644 help 645 Provides a helper to allocate chained scatterlists. This should be 646 selected by a driver or an API which whishes to allocate chained 647 scatterlist. 648 649# 650# sg chaining option 651# 652 653config ARCH_NO_SG_CHAIN 654 def_bool n 655 656config ARCH_HAS_PMEM_API 657 bool 658 659config MEMREGION 660 bool 661 662config ARCH_HAS_MEMREMAP_COMPAT_ALIGN 663 bool 664 665# use memcpy to implement user copies for nommu architectures 666config UACCESS_MEMCPY 667 bool 668 669config ARCH_HAS_UACCESS_FLUSHCACHE 670 bool 671 672# arch has a concept of a recoverable synchronous exception due to a 673# memory-read error like x86 machine-check or ARM data-abort, and 674# implements copy_mc_to_{user,kernel} to abort and report 675# 'bytes-transferred' if that exception fires when accessing the source 676# buffer. 677config ARCH_HAS_COPY_MC 678 bool 679 680# Temporary. Goes away when all archs are cleaned up 681config ARCH_STACKWALK 682 bool 683 684config STACKDEPOT 685 bool 686 select STACKTRACE 687 688config STACKDEPOT_ALWAYS_INIT 689 bool 690 select STACKDEPOT 691 692config REF_TRACKER 693 bool 694 depends on STACKTRACE_SUPPORT 695 select STACKDEPOT 696 697config SBITMAP 698 bool 699 700config PARMAN 701 tristate "parman" if COMPILE_TEST 702 703config OBJAGG 704 tristate "objagg" if COMPILE_TEST 705 706endmenu 707 708config GENERIC_IOREMAP 709 bool 710 711config GENERIC_LIB_ASHLDI3 712 bool 713 714config GENERIC_LIB_ASHRDI3 715 bool 716 717config GENERIC_LIB_LSHRDI3 718 bool 719 720config GENERIC_LIB_MULDI3 721 bool 722 723config GENERIC_LIB_CMPDI2 724 bool 725 726config GENERIC_LIB_UCMPDI2 727 bool 728 729config GENERIC_LIB_DEVMEM_IS_ALLOWED 730 bool 731 732config PLDMFW 733 bool 734 default n 735 736config ASN1_ENCODER 737 tristate 738 739config POLYNOMIAL 740 tristate 741