GNU Linux-libre 5.10.153-gnu1
[releases.git] / lib / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Library configuration
4 #
5
6 config BINARY_PRINTF
7         def_bool n
8
9 menu "Library routines"
10
11 config RAID6_PQ
12         tristate
13
14 config 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
22 config LINEAR_RANGES
23         tristate
24
25 config 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
42 config BITREVERSE
43         tristate
44
45 config 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
52 config GENERIC_STRNCPY_FROM_USER
53         bool
54
55 config GENERIC_STRNLEN_USER
56         bool
57
58 config GENERIC_NET_UTILS
59         bool
60
61 config GENERIC_FIND_FIRST_BIT
62         bool
63
64 source "lib/math/Kconfig"
65
66 config NO_GENERIC_PCI_IOPORT_MAP
67         bool
68
69 config GENERIC_PCI_IOMAP
70         bool
71
72 config GENERIC_IOMAP
73         bool
74         select GENERIC_PCI_IOMAP
75
76 config STMP_DEVICE
77         bool
78
79 config ARCH_USE_CMPXCHG_LOCKREF
80         bool
81
82 config ARCH_HAS_FAST_MULTIPLIER
83         bool
84
85 config ARCH_USE_SYM_ANNOTATIONS
86         bool
87
88 config 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
104 source "lib/crypto/Kconfig"
105
106 config LIB_MEMNEQ
107         bool
108
109 config 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
117 config 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
125 config 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
134 config 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
142 config 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
152 config 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
161 choice
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
170 config 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
181 config 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
190 config 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
198 config 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
206 endchoice
207
208 config 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
216 config 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
224 config 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
232 config 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
243 config 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
250 config XXHASH
251         tristate
252
253 config AUDIT_GENERIC
254         bool
255         depends on AUDIT && !AUDIT_ARCH
256         default y
257
258 config AUDIT_ARCH_COMPAT_GENERIC
259         bool
260         default n
261
262 config AUDIT_COMPAT_GENERIC
263         bool
264         depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
265         default y
266
267 config 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 #
276 config 842_COMPRESS
277         select CRC32
278         tristate
279
280 config 842_DECOMPRESS
281         select CRC32
282         tristate
283
284 config ZLIB_INFLATE
285         tristate
286
287 config ZLIB_DEFLATE
288         tristate
289         select BITREVERSE
290
291 config 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
298 config LZO_COMPRESS
299         tristate
300
301 config LZO_DECOMPRESS
302         tristate
303
304 config LZ4_COMPRESS
305         tristate
306
307 config LZ4HC_COMPRESS
308         tristate
309
310 config LZ4_DECOMPRESS
311         tristate
312
313 config ZSTD_COMPRESS
314         select XXHASH
315         tristate
316
317 config ZSTD_DECOMPRESS
318         select XXHASH
319         tristate
320
321 source "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 #
327 config DECOMPRESS_GZIP
328         select ZLIB_INFLATE
329         tristate
330
331 config DECOMPRESS_BZIP2
332         tristate
333
334 config DECOMPRESS_LZMA
335         tristate
336
337 config DECOMPRESS_XZ
338         select XZ_DEC
339         tristate
340
341 config DECOMPRESS_LZO
342         select LZO_DECOMPRESS
343         tristate
344
345 config DECOMPRESS_LZ4
346         select LZ4_DECOMPRESS
347         tristate
348
349 config DECOMPRESS_ZSTD
350         select ZSTD_DECOMPRESS
351         tristate
352
353 #
354 # Generic allocator support is selected if needed
355 #
356 config GENERIC_ALLOCATOR
357         bool
358
359 #
360 # reed solomon support is select'ed if needed
361 #
362 config REED_SOLOMON
363         tristate
364         
365 config REED_SOLOMON_ENC8
366         bool
367
368 config REED_SOLOMON_DEC8
369         bool
370
371 config REED_SOLOMON_ENC16
372         bool
373
374 config REED_SOLOMON_DEC16
375         bool
376
377 #
378 # BCH support is selected if needed
379 #
380 config BCH
381         tristate
382
383 config 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
399 config 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
409 config 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 #
419 config TEXTSEARCH
420         bool
421
422 config TEXTSEARCH_KMP
423         tristate
424
425 config TEXTSEARCH_BM
426         tristate
427
428 config TEXTSEARCH_FSM
429         tristate
430
431 config BTREE
432         bool
433
434 config 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
444                 Documentation/core-api/rbtree.rst
445
446           for more information.
447
448 config XARRAY_MULTI
449         bool
450         help
451           Support entries which occupy multiple consecutive indices in the
452           XArray.
453
454 config 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
468 config HAS_IOMEM
469         bool
470         depends on !NO_IOMEM
471         default y
472
473 config HAS_IOPORT_MAP
474         bool
475         depends on HAS_IOMEM && !NO_IOPORT_MAP
476         default y
477
478 source "kernel/dma/Kconfig"
479
480 config SGL_ALLOC
481         bool
482         default n
483
484 config IOMMU_HELPER
485         bool
486
487 config CHECK_SIGNATURE
488         bool
489
490 config 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
497 config CPU_RMAP
498         bool
499         depends on SMP
500
501 config DQL
502         bool
503
504 config 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
523 config 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 #
539 config NLATTR
540         bool
541
542 #
543 # Generic 64-bit atomic support is selected if needed
544 #
545 config GENERIC_ATOMIC64
546        bool
547
548 config LRU_CACHE
549         tristate
550
551 config CLZ_TAB
552         bool
553
554 config IRQ_POLL
555         bool "IRQ polling library"
556         help
557           Helper library to poll interrupt mitigation using polling.
558
559 config 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
567 config 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
577 config 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
584 #
585 # libfdt files, only selected if needed.
586 #
587 config LIBFDT
588         bool
589
590 config OID_REGISTRY
591         tristate
592         help
593           Enable fast lookup object identifier registry.
594
595 config UCS2_STRING
596         tristate
597
598 #
599 # generic vdso
600 #
601 source "lib/vdso/Kconfig"
602
603 source "lib/fonts/Kconfig"
604
605 config 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
612 config 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
623 config ARCH_NO_SG_CHAIN
624         def_bool n
625
626 config ARCH_HAS_PMEM_API
627         bool
628
629 config MEMREGION
630         bool
631
632 config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
633         bool
634
635 # use memcpy to implement user copies for nommu architectures
636 config UACCESS_MEMCPY
637         bool
638
639 config ARCH_HAS_UACCESS_FLUSHCACHE
640         bool
641
642 # 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.
647 config ARCH_HAS_COPY_MC
648         bool
649
650 # Temporary. Goes away when all archs are cleaned up
651 config ARCH_STACKWALK
652        bool
653
654 config STACKDEPOT
655         bool
656         select STACKTRACE
657
658 config SBITMAP
659         bool
660
661 config PARMAN
662         tristate "parman" if COMPILE_TEST
663
664 config OBJAGG
665         tristate "objagg" if COMPILE_TEST
666
667 config STRING_SELFTEST
668         tristate "Test string functions"
669
670 endmenu
671
672 config GENERIC_IOREMAP
673         bool
674
675 config GENERIC_LIB_ASHLDI3
676         bool
677
678 config GENERIC_LIB_ASHRDI3
679         bool
680
681 config GENERIC_LIB_LSHRDI3
682         bool
683
684 config GENERIC_LIB_MULDI3
685         bool
686
687 config GENERIC_LIB_CMPDI2
688         bool
689
690 config GENERIC_LIB_UCMPDI2
691         bool
692
693 config PLDMFW
694         bool
695         default n