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