xref: /linux-6.15/lib/Kconfig (revision feb541bf)
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 CRC4
205	tristate "CRC4 functions"
206	help
207	  This option is provided for the case where no in-kernel-tree
208	  modules require CRC4 functions, but a module built outside
209	  the kernel tree does. Such modules that use library CRC4
210	  functions require M here.
211
212config CRC7
213	tristate "CRC7 functions"
214	help
215	  This option is provided for the case where no in-kernel-tree
216	  modules require CRC7 functions, but a module built outside
217	  the kernel tree does. Such modules that use library CRC7
218	  functions require M here.
219
220config LIBCRC32C
221	tristate "CRC32c (Castagnoli, et al) Cyclic Redundancy-Check"
222	select CRC32
223	help
224	  This option just selects CRC32 and is provided for compatibility
225	  purposes until the users are updated to select CRC32 directly.
226
227config CRC8
228	tristate "CRC8 function"
229	help
230	  This option provides CRC8 function. Drivers may select this
231	  when they need to do cyclic redundancy check according CRC8
232	  algorithm. Module will be called crc8.
233
234config CRC_OPTIMIZATIONS
235	bool "Enable optimized CRC implementations" if EXPERT
236	default y
237	help
238	  Disabling this option reduces code size slightly by disabling the
239	  architecture-optimized implementations of any CRC variants that are
240	  enabled.  CRC checksumming performance may get much slower.
241
242	  Keep this enabled unless you're really trying to minimize the size of
243	  the kernel.
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
286config 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
293config 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_COMMON
309	select XXHASH
310	tristate
311
312config ZSTD_COMPRESS
313	select ZSTD_COMMON
314	tristate
315
316config ZSTD_DECOMPRESS
317	select ZSTD_COMMON
318	tristate
319
320source "lib/xz/Kconfig"
321
322#
323# These all provide a common interface (hence the apparent duplication with
324# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
325#
326config DECOMPRESS_GZIP
327	select ZLIB_INFLATE
328	tristate
329
330config DECOMPRESS_BZIP2
331	tristate
332
333config DECOMPRESS_LZMA
334	tristate
335
336config DECOMPRESS_XZ
337	select XZ_DEC
338	tristate
339
340config DECOMPRESS_LZO
341	select LZO_DECOMPRESS
342	tristate
343
344config DECOMPRESS_LZ4
345	select LZ4_DECOMPRESS
346	tristate
347
348config DECOMPRESS_ZSTD
349	select ZSTD_DECOMPRESS
350	tristate
351
352#
353# Generic allocator support is selected if needed
354#
355config GENERIC_ALLOCATOR
356	bool
357
358#
359# reed solomon support is select'ed if needed
360#
361config REED_SOLOMON
362	tristate
363
364config REED_SOLOMON_ENC8
365	bool
366
367config REED_SOLOMON_DEC8
368	bool
369
370config REED_SOLOMON_ENC16
371	bool
372
373config REED_SOLOMON_DEC16
374	bool
375
376#
377# BCH support is selected if needed
378#
379config BCH
380	tristate
381	select BITREVERSE
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
444		Documentation/core-api/rbtree.rst
445
446	  for more information.
447
448config INTERVAL_TREE_SPAN_ITER
449	bool
450	depends on INTERVAL_TREE
451
452config XARRAY_MULTI
453	bool
454	help
455	  Support entries which occupy multiple consecutive indices in the
456	  XArray.
457
458config ASSOCIATIVE_ARRAY
459	bool
460	help
461	  Generic associative array.  Can be searched and iterated over whilst
462	  it is being modified.  It is also reasonably quick to search and
463	  modify.  The algorithms are non-recursive, and the trees are highly
464	  capacious.
465
466	  See:
467
468		Documentation/core-api/assoc_array.rst
469
470	  for more information.
471
472config CLOSURES
473	bool
474
475config HAS_IOMEM
476	bool
477	depends on !NO_IOMEM
478	default y
479
480config HAS_IOPORT
481	bool
482
483config HAS_IOPORT_MAP
484	bool
485	depends on HAS_IOMEM && !NO_IOPORT_MAP
486	default y
487
488source "kernel/dma/Kconfig"
489
490config SGL_ALLOC
491	bool
492	default n
493
494config IOMMU_HELPER
495	bool
496
497config CHECK_SIGNATURE
498	bool
499
500config CPUMASK_OFFSTACK
501	bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
502	help
503	  Use dynamic allocation for cpumask_var_t, instead of putting
504	  them on the stack.  This is a bit more expensive, but avoids
505	  stack overflow.
506
507config FORCE_NR_CPUS
508	def_bool !SMP
509
510config CPU_RMAP
511	bool
512	depends on SMP
513
514config DQL
515	bool
516
517config GLOB
518	bool
519#	This actually supports modular compilation, but the module overhead
520#	is ridiculous for the amount of code involved.	Until an out-of-tree
521#	driver asks for it, we'll just link it directly it into the kernel
522#	when required.  Since we're ignoring out-of-tree users,	there's also
523#	no need bother prompting for a manual decision:
524#	prompt "glob_match() function"
525	help
526	  This option provides a glob_match function for performing
527	  simple text pattern matching.  It originated in the ATA code
528	  to blacklist particular drive models, but other device drivers
529	  may need similar functionality.
530
531	  All drivers in the Linux kernel tree that require this function
532	  should automatically select this option.  Say N unless you
533	  are compiling an out-of tree driver which tells you that it
534	  depends on this.
535
536config GLOB_SELFTEST
537	tristate "glob self-test on init"
538	depends on GLOB
539	help
540	  This option enables a simple self-test of the glob_match
541	  function on startup.	It is primarily useful for people
542	  working on the code to ensure they haven't introduced any
543	  regressions.
544
545	  It only adds a little bit of code and slows kernel boot (or
546	  module load) by a small amount, so you're welcome to play with
547	  it, but you probably don't need it.
548
549#
550# Netlink attribute parsing support is select'ed if needed
551#
552config NLATTR
553	bool
554
555#
556# Generic 64-bit atomic support is selected if needed
557#
558config GENERIC_ATOMIC64
559       bool
560
561config LRU_CACHE
562	tristate
563
564config CLZ_TAB
565	bool
566
567config IRQ_POLL
568	bool "IRQ polling library"
569	help
570	  Helper library to poll interrupt mitigation using polling.
571
572config MPILIB
573	tristate
574	select CLZ_TAB
575	help
576	  Multiprecision maths library from GnuPG.
577	  It is used to implement RSA digital signature verification,
578	  which is used by IMA/EVM digital signature extension.
579
580config SIGNATURE
581	tristate
582	depends on KEYS
583	select CRYPTO
584	select CRYPTO_SHA1
585	select MPILIB
586	help
587	  Digital signature verification. Currently only RSA is supported.
588	  Implementation is done using GnuPG MPI library
589
590config DIMLIB
591	tristate
592	depends on NET
593	help
594	  Dynamic Interrupt Moderation library.
595	  Implements an algorithm for dynamically changing CQ moderation values
596	  according to run time performance.
597
598#
599# libfdt files, only selected if needed.
600#
601config LIBFDT
602	bool
603
604config OID_REGISTRY
605	tristate
606	help
607	  Enable fast lookup object identifier registry.
608
609config UCS2_STRING
610	tristate
611
612#
613# generic vdso
614#
615source "lib/vdso/Kconfig"
616
617source "lib/fonts/Kconfig"
618
619config SG_SPLIT
620	def_bool n
621	help
622	 Provides a helper to split scatterlists into chunks, each chunk being
623	 a scatterlist. This should be selected by a driver or an API which
624	 whishes to split a scatterlist amongst multiple DMA channels.
625
626config SG_POOL
627	def_bool n
628	help
629	 Provides a helper to allocate chained scatterlists. This should be
630	 selected by a driver or an API which whishes to allocate chained
631	 scatterlist.
632
633#
634# sg chaining option
635#
636
637config ARCH_NO_SG_CHAIN
638	def_bool n
639
640config ARCH_HAS_PMEM_API
641	bool
642
643config MEMREGION
644	bool
645
646config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
647	bool
648
649config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
650	bool
651
652# use memcpy to implement user copies for nommu architectures
653config UACCESS_MEMCPY
654	bool
655
656config 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.
664config ARCH_HAS_COPY_MC
665	bool
666
667# Temporary. Goes away when all archs are cleaned up
668config ARCH_STACKWALK
669       bool
670
671config STACKDEPOT
672	bool
673	select STACKTRACE
674	help
675	  Stack depot: stack trace storage that avoids duplication
676
677config STACKDEPOT_ALWAYS_INIT
678	bool
679	select STACKDEPOT
680	help
681	  Always initialize stack depot during early boot
682
683config STACKDEPOT_MAX_FRAMES
684	int "Maximum number of frames in trace saved in stack depot"
685	range 1 256
686	default 64
687	depends on STACKDEPOT
688
689config REF_TRACKER
690	bool
691	depends on STACKTRACE_SUPPORT
692	select STACKDEPOT
693
694config SBITMAP
695	bool
696
697config PARMAN
698	tristate "parman" if COMPILE_TEST
699
700config OBJAGG
701	tristate "objagg" if COMPILE_TEST
702
703config LWQ_TEST
704	bool "Boot-time test for lwq queuing"
705	help
706          Run boot-time test of light-weight queuing.
707
708endmenu
709
710config GENERIC_IOREMAP
711	bool
712
713config GENERIC_LIB_ASHLDI3
714	bool
715
716config GENERIC_LIB_ASHRDI3
717	bool
718
719config GENERIC_LIB_LSHRDI3
720	bool
721
722config GENERIC_LIB_MULDI3
723	bool
724
725config GENERIC_LIB_CMPDI2
726	bool
727
728config GENERIC_LIB_UCMPDI2
729	bool
730
731config GENERIC_LIB_DEVMEM_IS_ALLOWED
732	bool
733
734config PLDMFW
735	bool
736	default n
737
738config ASN1_ENCODER
739       tristate
740
741config POLYNOMIAL
742       tristate
743
744config FIRMWARE_TABLE
745	bool
746
747config UNION_FIND
748	bool
749
750config MIN_HEAP
751	bool
752