xref: /linux/lib/Kconfig (revision bf45794244ca1fb1c135754f36ff765eea01f9e6)
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/crc/Kconfig"
140source "lib/crypto/Kconfig"
141
142config XXHASH
143	tristate
144
145config AUDIT_GENERIC
146	bool
147	depends on AUDIT && !AUDIT_ARCH
148	default y
149
150config AUDIT_ARCH_COMPAT_GENERIC
151	bool
152	default n
153
154config AUDIT_COMPAT_GENERIC
155	bool
156	depends on AUDIT_GENERIC && AUDIT_ARCH_COMPAT_GENERIC && COMPAT
157	default y
158
159config RANDOM32_SELFTEST
160	bool "PRNG perform self test on init"
161	help
162	  This option enables the 32 bit PRNG library functions to perform a
163	  self test on initialization.
164
165#
166# compression support is select'ed if needed
167#
168config 842_COMPRESS
169	select CRC32
170	tristate
171
172config 842_DECOMPRESS
173	select CRC32
174	tristate
175
176config ZLIB_INFLATE
177	tristate
178
179config ZLIB_DEFLATE
180	tristate
181	select BITREVERSE
182
183config ZLIB_DFLTCC
184	def_bool y
185	depends on S390
186	prompt "Enable s390x DEFLATE CONVERSION CALL support for kernel zlib"
187	help
188	 Enable s390x hardware support for zlib in the kernel.
189
190config LZO_COMPRESS
191	tristate
192
193config LZO_DECOMPRESS
194	tristate
195
196config LZ4_COMPRESS
197	tristate
198
199config LZ4HC_COMPRESS
200	tristate
201
202config LZ4_DECOMPRESS
203	tristate
204
205config ZSTD_COMMON
206	select XXHASH
207	tristate
208
209config ZSTD_COMPRESS
210	select ZSTD_COMMON
211	tristate
212
213config ZSTD_DECOMPRESS
214	select ZSTD_COMMON
215	tristate
216
217source "lib/xz/Kconfig"
218
219#
220# These all provide a common interface (hence the apparent duplication with
221# ZLIB_INFLATE; DECOMPRESS_GZIP is just a wrapper.)
222#
223config DECOMPRESS_GZIP
224	select ZLIB_INFLATE
225	tristate
226
227config DECOMPRESS_BZIP2
228	tristate
229
230config DECOMPRESS_LZMA
231	tristate
232
233config DECOMPRESS_XZ
234	select XZ_DEC
235	tristate
236
237config DECOMPRESS_LZO
238	select LZO_DECOMPRESS
239	tristate
240
241config DECOMPRESS_LZ4
242	select LZ4_DECOMPRESS
243	tristate
244
245config DECOMPRESS_ZSTD
246	select ZSTD_DECOMPRESS
247	tristate
248
249#
250# Generic allocator support is selected if needed
251#
252config GENERIC_ALLOCATOR
253	bool
254
255#
256# reed solomon support is select'ed if needed
257#
258config REED_SOLOMON
259	tristate
260
261config REED_SOLOMON_ENC8
262	bool
263
264config REED_SOLOMON_DEC8
265	bool
266
267config REED_SOLOMON_ENC16
268	bool
269
270config REED_SOLOMON_DEC16
271	bool
272
273#
274# BCH support is selected if needed
275#
276config BCH
277	tristate
278	select BITREVERSE
279
280config BCH_CONST_PARAMS
281	bool
282	help
283	  Drivers may select this option to force specific constant
284	  values for parameters 'm' (Galois field order) and 't'
285	  (error correction capability). Those specific values must
286	  be set by declaring default values for symbols BCH_CONST_M
287	  and BCH_CONST_T.
288	  Doing so will enable extra compiler optimizations,
289	  improving encoding and decoding performance up to 2x for
290	  usual (m,t) values (typically such that m*t < 200).
291	  When this option is selected, the BCH library supports
292	  only a single (m,t) configuration. This is mainly useful
293	  for NAND flash board drivers requiring known, fixed BCH
294	  parameters.
295
296config BCH_CONST_M
297	int
298	range 5 15
299	help
300	  Constant value for Galois field order 'm'. If 'k' is the
301	  number of data bits to protect, 'm' should be chosen such
302	  that (k + m*t) <= 2**m - 1.
303	  Drivers should declare a default value for this symbol if
304	  they select option BCH_CONST_PARAMS.
305
306config BCH_CONST_T
307	int
308	help
309	  Constant value for error correction capability in bits 't'.
310	  Drivers should declare a default value for this symbol if
311	  they select option BCH_CONST_PARAMS.
312
313#
314# Textsearch support is select'ed if needed
315#
316config TEXTSEARCH
317	bool
318
319config TEXTSEARCH_KMP
320	tristate
321
322config TEXTSEARCH_BM
323	tristate
324
325config TEXTSEARCH_FSM
326	tristate
327
328config BTREE
329	bool
330
331config INTERVAL_TREE
332	bool
333	help
334	  Simple, embeddable, interval-tree. Can find the start of an
335	  overlapping range in log(n) time and then iterate over all
336	  overlapping nodes. The algorithm is implemented as an
337	  augmented rbtree.
338
339	  See:
340
341		Documentation/core-api/rbtree.rst
342
343	  for more information.
344
345config INTERVAL_TREE_SPAN_ITER
346	bool
347	depends on INTERVAL_TREE
348
349config XARRAY_MULTI
350	bool
351	help
352	  Support entries which occupy multiple consecutive indices in the
353	  XArray.
354
355config ASSOCIATIVE_ARRAY
356	bool
357	help
358	  Generic associative array.  Can be searched and iterated over whilst
359	  it is being modified.  It is also reasonably quick to search and
360	  modify.  The algorithms are non-recursive, and the trees are highly
361	  capacious.
362
363	  See:
364
365		Documentation/core-api/assoc_array.rst
366
367	  for more information.
368
369config CLOSURES
370	bool
371
372config HAS_IOMEM
373	bool
374	depends on !NO_IOMEM
375	default y
376
377config HAS_IOPORT
378	bool
379
380config HAS_IOPORT_MAP
381	bool
382	depends on HAS_IOMEM && !NO_IOPORT_MAP
383	default y
384
385source "kernel/dma/Kconfig"
386
387config SGL_ALLOC
388	bool
389	default n
390
391config IOMMU_HELPER
392	bool
393
394config CHECK_SIGNATURE
395	bool
396
397config CPUMASK_OFFSTACK
398	bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
399	help
400	  Use dynamic allocation for cpumask_var_t, instead of putting
401	  them on the stack.  This is a bit more expensive, but avoids
402	  stack overflow.
403
404config FORCE_NR_CPUS
405	def_bool !SMP
406
407config CPU_RMAP
408	bool
409	depends on SMP
410
411config DQL
412	bool
413
414config GLOB
415	bool
416#	This actually supports modular compilation, but the module overhead
417#	is ridiculous for the amount of code involved.	Until an out-of-tree
418#	driver asks for it, we'll just link it directly it into the kernel
419#	when required.  Since we're ignoring out-of-tree users,	there's also
420#	no need bother prompting for a manual decision:
421#	prompt "glob_match() function"
422	help
423	  This option provides a glob_match function for performing
424	  simple text pattern matching.  It originated in the ATA code
425	  to blacklist particular drive models, but other device drivers
426	  may need similar functionality.
427
428	  All drivers in the Linux kernel tree that require this function
429	  should automatically select this option.  Say N unless you
430	  are compiling an out-of tree driver which tells you that it
431	  depends on this.
432
433#
434# Netlink attribute parsing support is select'ed if needed
435#
436config NLATTR
437	bool
438
439#
440# Generic 64-bit atomic support is selected if needed
441#
442config GENERIC_ATOMIC64
443       bool
444
445config LRU_CACHE
446	tristate
447
448config CLZ_TAB
449	bool
450
451config IRQ_POLL
452	bool "IRQ polling library"
453	help
454	  Helper library to poll interrupt mitigation using polling.
455
456config MPILIB
457	tristate
458	select CLZ_TAB
459	help
460	  Multiprecision maths library from GnuPG.
461	  It is used to implement RSA digital signature verification,
462	  which is used by IMA/EVM digital signature extension.
463
464config SIGNATURE
465	tristate
466	depends on KEYS
467	select CRYPTO_LIB_SHA1
468	select MPILIB
469	help
470	  Digital signature verification. Currently only RSA is supported.
471	  Implementation is done using GnuPG MPI library
472
473config DIMLIB
474	tristate
475	depends on NET
476	help
477	  Dynamic Interrupt Moderation library.
478	  Implements an algorithm for dynamically changing CQ moderation values
479	  according to run time performance.
480
481#
482# libfdt files, only selected if needed.
483#
484config LIBFDT
485	bool
486
487config OID_REGISTRY
488	tristate
489	help
490	  Enable fast lookup object identifier registry.
491
492config UCS2_STRING
493	tristate
494
495#
496# generic vdso
497#
498source "lib/vdso/Kconfig"
499
500source "lib/fonts/Kconfig"
501
502config SG_SPLIT
503	def_bool n
504	help
505	 Provides a helper to split scatterlists into chunks, each chunk being
506	 a scatterlist. This should be selected by a driver or an API which
507	 whishes to split a scatterlist amongst multiple DMA channels.
508
509config SG_POOL
510	def_bool n
511	help
512	 Provides a helper to allocate chained scatterlists. This should be
513	 selected by a driver or an API which whishes to allocate chained
514	 scatterlist.
515
516#
517# sg chaining option
518#
519
520config ARCH_NO_SG_CHAIN
521	def_bool n
522
523config ARCH_HAS_PMEM_API
524	bool
525
526config MEMREGION
527	bool
528
529config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
530	bool
531
532config GENERIC_CPU_CACHE_MAINTENANCE
533	bool
534
535config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
536	bool
537
538# use memcpy to implement user copies for nommu architectures
539config UACCESS_MEMCPY
540	bool
541
542config ARCH_HAS_UACCESS_FLUSHCACHE
543	bool
544
545# arch has a concept of a recoverable synchronous exception due to a
546# memory-read error like x86 machine-check or ARM data-abort, and
547# implements copy_mc_to_{user,kernel} to abort and report
548# 'bytes-transferred' if that exception fires when accessing the source
549# buffer.
550config ARCH_HAS_COPY_MC
551	bool
552
553# Temporary. Goes away when all archs are cleaned up
554config ARCH_STACKWALK
555       bool
556
557config STACKDEPOT
558	bool
559	select STACKTRACE
560	help
561	  Stack depot: stack trace storage that avoids duplication
562
563config STACKDEPOT_ALWAYS_INIT
564	bool
565	select STACKDEPOT
566	help
567	  Always initialize stack depot during early boot
568
569config STACKDEPOT_MAX_FRAMES
570	int "Maximum number of frames in trace saved in stack depot"
571	range 1 256
572	default 64
573	depends on STACKDEPOT
574
575config REF_TRACKER
576	bool
577	depends on STACKTRACE_SUPPORT
578	select STACKDEPOT
579
580config SBITMAP
581	bool
582
583config PARMAN
584	tristate "parman" if COMPILE_TEST
585
586config OBJAGG
587	tristate "objagg" if COMPILE_TEST
588
589config LWQ_TEST
590	bool "Boot-time test for lwq queuing"
591	help
592          Run boot-time test of light-weight queuing.
593
594endmenu
595
596config GENERIC_IOREMAP
597	bool
598
599config GENERIC_LIB_ASHLDI3
600	bool
601
602config GENERIC_LIB_ASHRDI3
603	bool
604
605config GENERIC_LIB_LSHRDI3
606	bool
607
608config GENERIC_LIB_MULDI3
609	bool
610
611config GENERIC_LIB_CMPDI2
612	bool
613
614config GENERIC_LIB_UCMPDI2
615	bool
616
617config GENERIC_LIB_DEVMEM_IS_ALLOWED
618	bool
619
620config PLDMFW
621	bool
622	select CRC32
623	default n
624
625config ASN1_ENCODER
626       tristate
627
628config POLYNOMIAL
629       tristate
630
631config FIRMWARE_TABLE
632	bool
633
634config UNION_FIND
635	bool
636
637config MIN_HEAP
638	bool
639