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