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