lib/Kconfig

Source file repositories/reference/linux-study-clean/lib/Kconfig

File Facts

System
Linux kernel
Corpus path
lib/Kconfig
Extension
[no extension]
Size
12935 bytes
Lines
639
Domain
Kernel Services
Bucket
lib
Inferred role
Kernel Services: build/configuration rule
Status
atlas-only

Why This File Exists

Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only
#
# Library configuration
#

config BINARY_PRINTF
	def_bool n

menu "Library routines"

config LINEAR_RANGES
	tristate

config PACKING
	bool "Generic bitfield packing and unpacking"
	select BITREVERSE
	default n
	help
	  This option provides the packing() helper function, which permits
	  converting bitfields between a CPU-usable representation and a
	  memory representation that can have any combination of these quirks:
	    - Is little endian (bytes are reversed within a 32-bit group)
	    - The least-significant 32-bit word comes first (within a 64-bit
	      group)
	    - The most significant bit of a byte is at its right (bit 0 of a
	      register description is numerically 2^7).
	  Drivers may use these helpers to match the bit indices as described
	  in the data sheets of the peripherals they are in control of.

	  When in doubt, say N.

config PACKING_KUNIT_TEST
	tristate "KUnit tests for packing library" if !KUNIT_ALL_TESTS
	depends on PACKING && KUNIT
	default KUNIT_ALL_TESTS
	help
	  This builds KUnit tests for the packing library.

	  For more information on KUnit and unit tests in general,
	  please refer to the KUnit documentation in Documentation/dev-tools/kunit/.

	  When in doubt, say N.

config BITREVERSE
	tristate
	select GENERIC_BITREVERSE if !HAVE_ARCH_BITREVERSE

config HAVE_ARCH_BITREVERSE
	bool
	default n
	depends on BITREVERSE
	help
	  This option enables the use of hardware bit-reversal instructions on
	  architectures which support such operations.

config GENERIC_BITREVERSE
	tristate
	depends on BITREVERSE
	help
	  Generic bit reversal implementation. Drivers should never enable
	  it explicitly. Instead, enable BITREVERSE.

	  Architectures may want to select it as a fall-back option for
	  HAVE_ARCH_BITREVERSE, when the hardware-accelerated bit reverse
	  instruction set is optional, like RISC-V ZBKB extension.

config ARCH_HAS_STRNCPY_FROM_USER
	bool

config ARCH_HAS_STRNLEN_USER

Annotation

Implementation Notes