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