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