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 LINEAR_RANGES 12 tristate 13 14config PACKING 15 bool "Generic bitfield packing and unpacking" 16 select BITREVERSE 17 default n 18 help 19 This option provides the packing() helper function, which permits 20 converting bitfields between a CPU-usable representation and a 21 memory representation that can have any combination of these quirks: 22 - Is little endian (bytes are reversed within a 32-bit group) 23 - The least-significant 32-bit word comes first (within a 64-bit 24 group) 25 - The most significant bit of a byte is at its right (bit 0 of a 26 register description is numerically 2^7). 27 Drivers may use these helpers to match the bit indices as described 28 in the data sheets of the peripherals they are in control of. 29 30 When in doubt, say N. 31 32config PACKING_KUNIT_TEST 33 tristate "KUnit tests for packing library" if !KUNIT_ALL_TESTS 34 depends on PACKING && KUNIT 35 default KUNIT_ALL_TESTS 36 help 37 This builds KUnit tests for the packing library. 38 39 For more information on KUnit and unit tests in general, 40 please refer to the KUnit documentation in Documentation/dev-tools/kunit/. 41 42 When in doubt, say N. 43 44config BITREVERSE 45 tristate 46 select GENERIC_BITREVERSE if !HAVE_ARCH_BITREVERSE 47 48config HAVE_ARCH_BITREVERSE 49 bool 50 default n 51 depends on BITREVERSE 52 help 53 This option enables the use of hardware bit-reversal instructions on 54 architectures which support such operations. 55 56config GENERIC_BITREVERSE 57 tristate 58 depends on BITREVERSE 59 help 60 Generic bit reversal implementation. Drivers should never enable 61 it explicitly. Instead, enable BITREVERSE. 62 63 Architectures may want to select it as a fall-back option for 64 HAVE_ARCH_BITREVERSE, when the hardware-accelerated bit reverse 65 instruction set is optional, like RISC-V ZBKB extension. 66 67config ARCH_HAS_STRNCPY_FROM_USER 68 bool 69 70config ARCH_HAS_STRNLEN_USER 71 bool 72 73config GENERIC_STRNCPY_FROM_USER 74 def_bool !ARCH_HAS_STRNCPY_FROM_USER 75 76config GENERIC_STRNLEN_USER 77 def_bool !ARCH_HAS_STRNLEN_USER 78 79config GENERIC_NET_UTILS 80 bool 81 82source "lib/math/Kconfig" 83 84config NO_GENERIC_PCI_IOPORT_MAP 85 bool 86 87config GENERIC_IOMAP 88 bool 89 select GENERIC_PCI_IOMAP 90 91config STMP_DEVICE 92 bool 93 94config ARCH_USE_CMPXCHG_LOCKREF 95 bool 96 97config ARCH_HAS_FAST_MULTIPLIER 98 bool 99 100config ARCH_USE_SYM_ANNOTATIONS 101 bool 102 103config INDIRECT_PIO 104 bool "Access I/O in non-MMIO mode" 105 depends on ARM64 106 depends on HAS_IOPORT 107 help 108 On some platforms where no separate I/O space exists, there are I/O 109 hosts which can not be accessed in MMIO mode. Using the logical PIO 110 mechanism, the host-local I/O resource can be mapped into system 111 logic PIO space shared with MMIO hosts, such as PCI/PCIe, then the 112 system can access the I/O devices with the mapped-logic PIO through 113 I/O accessors. 114 115 This way has relatively little I/O performance cost. Please make 116 sure your devices really need this configure item enabled. 117 118 When in doubt, say N. 119 120config INDIRECT_IOMEM 121 bool 122 help 123 This is selected by other options/architectures to provide the 124 emulated iomem accessors. 125 126config INDIRECT_IOMEM_FALLBACK 127 bool 128 depends on INDIRECT_IOMEM 129 help 130 If INDIRECT_IOMEM is selected, this enables falling back to plain 131 mmio accesses when the IO memory address is not a registered 132 emulated region. 133 134config TRACE_MMIO_ACCESS 135 bool "Register read/write tracing" 136 depends on TRACING && ARCH_HAVE_TRACE_MMIO_ACCESS 137 help 138 Create tracepoints for MMIO read/write operations. These trace events 139 can be used for logging all MMIO read/write operations. 140 141source "lib/crc/Kconfig" 142source "lib/crypto/Kconfig" 143source "lib/raid/Kconfig" 144 145config XXHASH 146 tristate 147 148config AUDIT_GENERIC 149 bool 150 depends on AUDIT && !AUDIT_ARCH 151 default y 152 153config AUDIT_ARCH_COMPAT_GENERIC 154 bool 155 default n 156 157config AUDIT_COMPAT_GENERIC 158 bool 159 depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT 160 default y 161 162config RANDOM32_SELFTEST 163 bool "PRNG perform self test on init" 164 help 165 This option enables the 32 bit PRNG library functions to perform a 166 self test on initialization. 167 168# 169# compression support is select'ed if needed 170# 171config 842_COMPRESS 172 select CRC32 173 tristate 174 175config 842_DECOMPRESS 176 select CRC32 177 tristate 178 179config ZLIB_INFLATE 180 tristate 181 182config ZLIB_DEFLATE 183 tristate 184 select BITREVERSE 185 186config ZLIB_DFLTCC 187 def_bool y 188 depends on S390 189 prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib" 190 help 191 Enable s390x hardware support for zlib in the kernel. 192 193config LZO_COMPRESS 194 tristate 195 196config LZO_DECOMPRESS 197 tristate 198 199config LZ4_COMPRESS 200 tristate 201 202config LZ4HC_COMPRESS 203 tristate 204 205config LZ4_DECOMPRESS 206 tristate 207 208config ZSTD_COMMON 209 select XXHASH 210 tristate 211 212config ZSTD_COMPRESS 213 select ZSTD_COMMON 214 tristate 215 216config ZSTD_DECOMPRESS 217 select ZSTD_COMMON 218 tristate 219 220source "lib/xz/Kconfig" 221 222# 223# These all provide a common interface (hence the apparent duplication with 224# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.) 225# 226config DECOMPRESS_GZIP 227 select ZLIB_INFLATE 228 tristate 229 230config DECOMPRESS_BZIP2 231 tristate 232 233config DECOMPRESS_LZMA 234 tristate 235 236config DECOMPRESS_XZ 237 select XZ_DEC 238 tristate 239 240config DECOMPRESS_LZO 241 select LZO_DECOMPRESS 242 tristate 243 244config DECOMPRESS_LZ4 245 select LZ4_DECOMPRESS 246 tristate 247 248config DECOMPRESS_ZSTD 249 select ZSTD_DECOMPRESS 250 tristate 251 252# 253# Generic allocator support is selected if needed 254# 255config GENERIC_ALLOCATOR 256 bool 257 258# 259# reed solomon support is select'ed if needed 260# 261config REED_SOLOMON 262 tristate 263 264config REED_SOLOMON_ENC8 265 bool 266 267config REED_SOLOMON_DEC8 268 bool 269 270config REED_SOLOMON_ENC16 271 bool 272 273config REED_SOLOMON_DEC16 274 bool 275 276# 277# BCH support is selected if needed 278# 279config BCH 280 tristate 281 select BITREVERSE 282 283config BCH_CONST_PARAMS 284 bool 285 help 286 Drivers may select this option to force specific constant 287 values for parameters 'm' (Galois field order) and 't' 288 (error correction capability). Those specific values must 289 be set by declaring default values for symbols BCH_CONST_M 290 and BCH_CONST_T. 291 Doing so will enable extra compiler optimizations, 292 improving encoding and decoding performance up to 2x for 293 usual (m,t) values (typically such that m*t < 200). 294 When this option is selected, the BCH library supports 295 only a single (m,t) configuration. This is mainly useful 296 for NAND flash board drivers requiring known, fixed BCH 297 parameters. 298 299config BCH_CONST_M 300 int 301 range 5 15 302 help 303 Constant value for Galois field order 'm'. If 'k' is the 304 number of data bits to protect, 'm' should be chosen such 305 that (k + m*t) <= 2**m - 1. 306 Drivers should declare a default value for this symbol if 307 they select option BCH_CONST_PARAMS. 308 309config BCH_CONST_T 310 int 311 help 312 Constant value for error correction capability in bits 't'. 313 Drivers should declare a default value for this symbol if 314 they select option BCH_CONST_PARAMS. 315 316# 317# Textsearch support is select'ed if needed 318# 319config TEXTSEARCH 320 bool 321 322config TEXTSEARCH_KMP 323 tristate 324 325config TEXTSEARCH_BM 326 tristate 327 328config TEXTSEARCH_FSM 329 tristate 330 331config BTREE 332 bool 333 334config INTERVAL_TREE 335 bool 336 help 337 Simple, embeddable, interval-tree. Can find the start of an 338 overlapping range in log(n) time and then iterate over all 339 overlapping nodes. The algorithm is implemented as an 340 augmented rbtree. 341 342 See: 343 344 Documentation/core-api/rbtree.rst 345 346 for more information. 347 348config INTERVAL_TREE_SPAN_ITER 349 bool 350 depends on INTERVAL_TREE 351 352config XARRAY_MULTI 353 bool 354 help 355 Support entries which occupy multiple consecutive indices in the 356 XArray. 357 358config ASSOCIATIVE_ARRAY 359 bool 360 help 361 Generic associative array. Can be searched and iterated over whilst 362 it is being modified. It is also reasonably quick to search and 363 modify. The algorithms are non-recursive, and the trees are highly 364 capacious. 365 366 See: 367 368 Documentation/core-api/assoc_array.rst 369 370 for more information. 371 372config CLOSURES 373 bool 374 375config HAS_IOMEM 376 bool 377 depends on !NO_IOMEM 378 default y 379 380config HAS_IOPORT 381 bool 382 383config HAS_IOPORT_MAP 384 bool 385 depends on HAS_IOMEM && !NO_IOPORT_MAP 386 default y 387 388source "kernel/dma/Kconfig" 389 390config SGL_ALLOC 391 bool 392 default n 393 394config IOMMU_HELPER 395 bool 396 397config CHECK_SIGNATURE 398 bool 399 400config CPUMASK_OFFSTACK 401 bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS 402 help 403 Use dynamic allocation for cpumask_var_t, instead of putting 404 them on the stack. This is a bit more expensive, but avoids 405 stack overflow. 406 407config FORCE_NR_CPUS 408 def_bool !SMP 409 410config CPU_RMAP 411 bool 412 depends on SMP 413 414config DQL 415 bool 416 417config GLOB 418 bool 419# This actually supports modular compilation, but the module overhead 420# is ridiculous for the amount of code involved. Until an out-of-tree 421# driver asks for it, we'll just link it directly it into the kernel 422# when required. Since we're ignoring out-of-tree users, there's also 423# no need bother prompting for a manual decision: 424# prompt "glob_match() function" 425 help 426 This option provides a glob_match function for performing 427 simple text pattern matching. It originated in the ATA code 428 to blacklist particular drive models, but other device drivers 429 may need similar functionality. 430 431 All drivers in the Linux kernel tree that require this function 432 should automatically select this option. Say N unless you 433 are compiling an out-of tree driver which tells you that it 434 depends on this. 435 436# 437# Netlink attribute parsing support is select'ed if needed 438# 439config NLATTR 440 bool 441 442# 443# Generic 64-bit atomic support is selected if needed 444# 445config GENERIC_ATOMIC64 446 bool 447 448config LRU_CACHE 449 tristate 450 451config CLZ_TAB 452 bool 453 454config IRQ_POLL 455 bool "IRQ polling library" 456 help 457 Helper library to poll interrupt mitigation using polling. 458 459config MPILIB 460 tristate 461 select CLZ_TAB 462 help 463 Multiprecision maths library from GnuPG. 464 It is used to implement RSA digital signature verification, 465 which is used by IMA/EVM digital signature extension. 466 467config SIGNATURE 468 tristate 469 depends on KEYS 470 select CRYPTO_LIB_SHA1 471 select MPILIB 472 help 473 Digital signature verification. Currently only RSA is supported. 474 Implementation is done using GnuPG MPI library 475 476config DIMLIB 477 tristate 478 depends on NET 479 help 480 Dynamic Interrupt Moderation library. 481 Implements an algorithm for dynamically changing CQ moderation values 482 according to run time performance. 483 484# 485# libfdt files, only selected if needed. 486# 487config LIBFDT 488 bool 489 490config OID_REGISTRY 491 tristate 492 help 493 Enable fast lookup object identifier registry. 494 495config UCS2_STRING 496 tristate 497 498# 499# generic vdso 500# 501source "lib/vdso/Kconfig" 502 503source "lib/fonts/Kconfig" 504 505config SG_SPLIT 506 def_bool n 507 help 508 Provides a helper to split scatterlists into chunks, each chunk being 509 a scatterlist. This should be selected by a driver or an API which 510 whishes to split a scatterlist amongst multiple DMA channels. 511 512config SG_POOL 513 def_bool n 514 help 515 Provides a helper to allocate chained scatterlists. This should be 516 selected by a driver or an API which whishes to allocate chained 517 scatterlist. 518 519# 520# sg chaining option 521# 522 523config ARCH_NO_SG_CHAIN 524 def_bool n 525 526config ARCH_HAS_PMEM_API 527 bool 528 529config MEMREGION 530 bool 531 532config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION 533 bool 534 535config GENERIC_CPU_CACHE_MAINTENANCE 536 bool 537 538config ARCH_HAS_MEMREMAP_COMPAT_ALIGN 539 bool 540 541# use memcpy to implement user copies for nommu architectures 542config UACCESS_MEMCPY 543 bool 544 545config ARCH_HAS_UACCESS_FLUSHCACHE 546 bool 547 548# arch has a concept of a recoverable synchronous exception due to a 549# memory-read error like x86 machine-check or ARM data-abort, and 550# implements copy_mc_to_{user,kernel} to abort and report 551# 'bytes-transferred' if that exception fires when accessing the source 552# buffer. 553config ARCH_HAS_COPY_MC 554 bool 555 556# Temporary. Goes away when all archs are cleaned up 557config ARCH_STACKWALK 558 bool 559 560config STACKDEPOT 561 bool 562 select STACKTRACE 563 help 564 Stack depot: stack trace storage that avoids duplication 565 566config STACKDEPOT_ALWAYS_INIT 567 bool 568 select STACKDEPOT 569 help 570 Always initialize stack depot during early boot 571 572config STACKDEPOT_MAX_FRAMES 573 int "Maximum number of frames in trace saved in stack depot" 574 range 1 256 575 default 64 576 depends on STACKDEPOT 577 578config REF_TRACKER 579 bool 580 depends on STACKTRACE_SUPPORT 581 select STACKDEPOT 582 583config SBITMAP 584 bool 585 586config PARMAN 587 tristate "parman" if COMPILE_TEST 588 589config OBJAGG 590 tristate "objagg" if COMPILE_TEST 591 592config LWQ_TEST 593 bool "Boot-time test for lwq queuing" 594 help 595 Run boot-time test of light-weight queuing. 596 597endmenu 598 599config GENERIC_IOREMAP 600 bool 601 602config GENERIC_LIB_ASHLDI3 603 bool 604 605config GENERIC_LIB_ASHRDI3 606 bool 607 608config GENERIC_LIB_LSHRDI3 609 bool 610 611config GENERIC_LIB_MULDI3 612 bool 613 614config GENERIC_LIB_CMPDI2 615 bool 616 617config GENERIC_LIB_UCMPDI2 618 bool 619 620config GENERIC_LIB_DEVMEM_IS_ALLOWED 621 bool 622 623config PLDMFW 624 bool 625 select CRC32 626 default n 627 628config ASN1_ENCODER 629 tristate 630 631config FIRMWARE_TABLE 632 bool 633 634config UNION_FIND 635 bool 636 637config MIN_HEAP 638 bool 639