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