xref: /linux/lib/Kconfig (revision a578dd095dfe8b56c167201d9aea43e47d27f807)
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
433config GLOB_SELFTEST
434	tristate "glob self-test on init"
435	depends on GLOB
436	help
437	  This option enables a simple self-test of the glob_match
438	  function on startup.	It is primarily useful for people
439	  working on the code to ensure they haven't introduced any
440	  regressions.
441
442	  It only adds a little bit of code and slows kernel boot (or
443	  module load) by a small amount, so you're welcome to play with
444	  it, but you probably don't need it.
445
446#
447# Netlink attribute parsing support is select'ed if needed
448#
449config NLATTR
450	bool
451
452#
453# Generic 64-bit atomic support is selected if needed
454#
455config GENERIC_ATOMIC64
456       bool
457
458config LRU_CACHE
459	tristate
460
461config CLZ_TAB
462	bool
463
464config IRQ_POLL
465	bool "IRQ polling library"
466	help
467	  Helper library to poll interrupt mitigation using polling.
468
469config MPILIB
470	tristate
471	select CLZ_TAB
472	help
473	  Multiprecision maths library from GnuPG.
474	  It is used to implement RSA digital signature verification,
475	  which is used by IMA/EVM digital signature extension.
476
477config SIGNATURE
478	tristate
479	depends on KEYS
480	select CRYPTO
481	select CRYPTO_SHA1
482	select MPILIB
483	help
484	  Digital signature verification. Currently only RSA is supported.
485	  Implementation is done using GnuPG MPI library
486
487config DIMLIB
488	tristate
489	depends on NET
490	help
491	  Dynamic Interrupt Moderation library.
492	  Implements an algorithm for dynamically changing CQ moderation values
493	  according to run time performance.
494
495#
496# libfdt files, only selected if needed.
497#
498config LIBFDT
499	bool
500
501config OID_REGISTRY
502	tristate
503	help
504	  Enable fast lookup object identifier registry.
505
506config UCS2_STRING
507	tristate
508
509#
510# generic vdso
511#
512source "lib/vdso/Kconfig"
513
514source "lib/fonts/Kconfig"
515
516config SG_SPLIT
517	def_bool n
518	help
519	 Provides a helper to split scatterlists into chunks, each chunk being
520	 a scatterlist. This should be selected by a driver or an API which
521	 whishes to split a scatterlist amongst multiple DMA channels.
522
523config SG_POOL
524	def_bool n
525	help
526	 Provides a helper to allocate chained scatterlists. This should be
527	 selected by a driver or an API which whishes to allocate chained
528	 scatterlist.
529
530#
531# sg chaining option
532#
533
534config ARCH_NO_SG_CHAIN
535	def_bool n
536
537config ARCH_HAS_PMEM_API
538	bool
539
540config MEMREGION
541	bool
542
543config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
544	bool
545
546config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
547	bool
548
549# use memcpy to implement user copies for nommu architectures
550config UACCESS_MEMCPY
551	bool
552
553config ARCH_HAS_UACCESS_FLUSHCACHE
554	bool
555
556# arch has a concept of a recoverable synchronous exception due to a
557# memory-read error like x86 machine-check or ARM data-abort, and
558# implements copy_mc_to_{user,kernel} to abort and report
559# 'bytes-transferred' if that exception fires when accessing the source
560# buffer.
561config ARCH_HAS_COPY_MC
562	bool
563
564# Temporary. Goes away when all archs are cleaned up
565config ARCH_STACKWALK
566       bool
567
568config STACKDEPOT
569	bool
570	select STACKTRACE
571	help
572	  Stack depot: stack trace storage that avoids duplication
573
574config STACKDEPOT_ALWAYS_INIT
575	bool
576	select STACKDEPOT
577	help
578	  Always initialize stack depot during early boot
579
580config STACKDEPOT_MAX_FRAMES
581	int "Maximum number of frames in trace saved in stack depot"
582	range 1 256
583	default 64
584	depends on STACKDEPOT
585
586config REF_TRACKER
587	bool
588	depends on STACKTRACE_SUPPORT
589	select STACKDEPOT
590
591config SBITMAP
592	bool
593
594config PARMAN
595	tristate "parman" if COMPILE_TEST
596
597config OBJAGG
598	tristate "objagg" if COMPILE_TEST
599
600config LWQ_TEST
601	bool "Boot-time test for lwq queuing"
602	help
603          Run boot-time test of light-weight queuing.
604
605endmenu
606
607config GENERIC_IOREMAP
608	bool
609
610config GENERIC_LIB_ASHLDI3
611	bool
612
613config GENERIC_LIB_ASHRDI3
614	bool
615
616config GENERIC_LIB_LSHRDI3
617	bool
618
619config GENERIC_LIB_MULDI3
620	bool
621
622config GENERIC_LIB_CMPDI2
623	bool
624
625config GENERIC_LIB_UCMPDI2
626	bool
627
628config GENERIC_LIB_DEVMEM_IS_ALLOWED
629	bool
630
631config PLDMFW
632	bool
633	select CRC32
634	default n
635
636config ASN1_ENCODER
637       tristate
638
639config POLYNOMIAL
640       tristate
641
642config FIRMWARE_TABLE
643	bool
644
645config UNION_FIND
646	bool
647
648config MIN_HEAP
649	bool
650