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