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