# SPDX-License-Identifier: GPL-2.0 # # General architecture dependent options # # # Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can # override the default values in this file. # source "arch/$(SRCARCH)/Kconfig" menu "General architecture-dependent options" config CRASH_CORE bool config KEXEC_CORE select CRASH_CORE bool config KEXEC_ELF bool config HAVE_IMA_KEXEC bool config HOTPLUG_SMT bool config OPROFILE tristate "OProfile system profiling" depends on PROFILING depends on HAVE_OPROFILE select RING_BUFFER select RING_BUFFER_ALLOW_SWAP help OProfile is a profiling system capable of profiling the whole system, include the kernel, kernel modules, libraries, and applications. If unsure, say N. config OPROFILE_EVENT_MULTIPLEX bool "OProfile multiplexing support (EXPERIMENTAL)" default n depends on OPROFILE && X86 help The number of hardware counters is limited. The multiplexing feature enables OProfile to gather more events than counters are provided by the hardware. This is realized by switching between events at a user specified time interval. If unsure, say N. config HAVE_OPROFILE bool config OPROFILE_NMI_TIMER def_bool y depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 config KPROBES bool "Kprobes" depends on MODULES depends on HAVE_KPROBES select KALLSYMS help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes a probepoint and specifies the callback. Kprobes is useful for kernel debugging, non-intrusive instrumentation and testing. If in doubt, say "N". config JUMP_LABEL bool "Optimize very unlikely/likely branches" depends on HAVE_ARCH_JUMP_LABEL depends on CC_HAS_ASM_GOTO help This option enables a transparent branch optimization that makes certain almost-always-true or almost-always-false branch conditions even cheaper to execute within the kernel. Certain performance-sensitive kernel code, such as trace points, scheduler functionality, networking code and KVM have such branches and include support for this optimization technique. If it is detected that the compiler has support for "asm goto", the kernel will compile such branches with just a nop instruction. When the condition flag is toggled to true, the nop will be converted to a jump instruction to execute the conditional block of instructions. This technique lowers overhead and stress on the branch prediction of the processor and generally makes the kernel faster. The update of the condition is slower, but those are always very rare. ( On 32-bit x86, the necessary options added to the compiler flags may increase the size of the kernel slightly. ) config STATIC_KEYS_SELFTEST bool "Static key selftest" depends on JUMP_LABEL help Boot time self-test of the branch patching code. config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES select TASKS_RCU if PREEMPTION config KPROBES_ON_FTRACE def_bool y depends on KPROBES && HAVE_KPROBES_ON_FTRACE depends on DYNAMIC_FTRACE_WITH_REGS help If function tracer is enabled and the arch supports full passing of pt_regs to function tracing, then kprobes can optimize on top of function tracing. config UPROBES def_bool n depends on ARCH_SUPPORTS_UPROBES help Uprobes is the user-space counterpart to kprobes: they enable instrumentation applications (such as 'perf probe') to establish unintrusive probes in user-space binaries and libraries, by executing handler functions when the probes are hit by user-space applications. ( These probes come in the form of single-byte breakpoints, managed by the kernel and kept transparent to the probed application. ) config HAVE_EFFICIENT_UNALIGNED_ACCESS bool help Some architectures are unable to perform unaligned accesses without the use of get_unaligned/put_unaligned. Others are unable to perform such accesses efficiently (e.g. trap on unaligned access and require fixing it up in the exception handler.) This symbol should be selected by an architecture if it can perform unaligned accesses efficiently to allow different code paths to be selected for these cases. Some network drivers, for example, could opt to not fix up alignment problems with received packets if doing so would not help much. See Documentation/unaligned-memory-access.txt for more information on the topic of unaligned memory accesses. config ARCH_USE_BUILTIN_BSWAP bool help Modern versions of GCC (since 4.4) have builtin functions for handling byte-swapping. Using these, instead of the old inline assembler that the architecture code provides in the __arch_bswapXX() macros, allows the compiler to see what's happening and offers more opportunity for optimisation. In particular, the compiler will be able to combine the byteswap with a nearby load or store and use load-and-swap or store-and-swap instructions if the architecture has them. It should almost *never* result in code which is worse than the hand-coded assembler in . But just in case it does, the use of the builtins is optional. Any architecture with load-and-swap or store-and-swap instructions should set this. And it shouldn't hurt to set it on architectures that don't have such instructions. config KRETPROBES def_bool y depends on KPROBES && HAVE_KRETPROBES config USER_RETURN_NOTIFIER bool depends on HAVE_USER_RETURN_NOTIFIER help Provide a kernel-internal notification when a cpu is about to switch to user mode. config HAVE_IOREMAP_PROT bool config HAVE_KPROBES bool config HAVE_KRETPROBES bool config HAVE_OPTPROBES bool config HAVE_KPROBES_ON_FTRACE bool config HAVE_FUNCTION_ERROR_INJECTION bool config HAVE_NMI bool # # An arch should select this if it provides all these things: # # task_pt_regs() in asm/processor.h or asm/ptrace.h # arch_has_single_step() if there is hardware single-step support # arch_has_block_step() if there is hardware block-step support # asm/syscall.h supplying asm-generic/syscall.h interface # linux/regset.h user_regset interfaces # CORE_DUMP_USE_REGSET #define'd in linux/elf.h # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit} # TIF_NOTIFY_RESUME calls tracehook_notify_resume() # signal delivery calls tracehook_signal_handler() # config HAVE_ARCH_TRACEHOOK bool config HAVE_DMA_CONTIGUOUS bool config GENERIC_SMP_IDLE_THREAD bool config GENERIC_IDLE_POLL_SETUP bool config ARCH_HAS_FORTIFY_SOURCE bool help An architecture should select this when it can successfully build and run with CONFIG_FORTIFY_SOURCE. # # Select if the arch provides a historic keepinit alias for the retain_initrd # command line option # config ARCH_HAS_KEEPINITRD bool # Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h config ARCH_HAS_SET_MEMORY bool # Select if arch has all set_direct_map_invalid/default() functions config ARCH_HAS_SET_DIRECT_MAP bool # # Select if the architecture provides the arch_dma_set_uncached symbol to # either provide an uncached segement alias for a DMA allocation, or # to remap the page tables in place. # config ARCH_HAS_DMA_SET_UNCACHED bool # # Select if the architectures provides the arch_dma_clear_uncached symbol # to undo an in-place page table remap for uncached access. # config ARCH_HAS_DMA_CLEAR_UNCACHED bool # Select if arch init_task must go in the __init_task_data section config ARCH_TASK_STRUCT_ON_STACK bool # Select if arch has its private alloc_task_struct() function config ARCH_TASK_STRUCT_ALLOCATOR bool config HAVE_ARCH_THREAD_STRUCT_WHITELIST bool depends on !ARCH_TASK_STRUCT_ALLOCATOR help An architecture should select this to provide hardened usercopy knowledge about what region of the thread_struct should be whitelisted for copying to userspace. Normally this is only the FPU registers. Specifically, arch_thread_struct_whitelist() should be implemented. Without this, the entire thread_struct field in task_struct will be left whitelisted. # Select if arch has its private alloc_thread_stack() function config ARCH_THREAD_STACK_ALLOCATOR bool # Select if arch wants to size task_struct dynamically via arch_task_struct_size: config ARCH_WANTS_DYNAMIC_TASK_STRUCT bool config ARCH_32BIT_OFF_T bool depends on !64BIT help All new 32-bit architectures should have 64-bit off_t type on userspace side which corresponds to the loff_t kernel type. This is the requirement for modern ABIs. Some existing architectures still support 32-bit off_t. This option is enabled for all such architectures explicitly. config HAVE_ASM_MODVERSIONS bool help This symbol should be selected by an architecure if it provides to support the module versioning for symbols exported from assembly code. config HAVE_REGS_AND_STACK_ACCESS_API bool help This symbol should be selected by an architecure if it supports the API needed to access registers and stack entries from pt_regs, declared in asm/ptrace.h For example the kprobes-based event tracer nee
# SPDX-License-Identifier: GPL-2.0
#
# Block layer core configuration
#
menuconfig BLOCK
       bool "Enable the block layer" if EXPERT
       default y
       select SBITMAP
       select SRCU
       help
	 Provide block layer support for the kernel.

	 Disable this option to remove the block layer support from the
	 kernel. This may be useful for embedded devices.

	 If this option is disabled:

	   - block device files will become unusable
	   - some filesystems (such as ext3) will become unavailable.

	 Also, SCSI character devices and USB storage will be disabled since
	 they make use of various block layer definitions and facilities.

	 Say Y here unless you know you really don't want to mount disks and
	 suchlike.

if BLOCK

config BLK_SCSI_REQUEST
	bool

config BLK_DEV_BSG
	bool "Block layer SG support v4"
	default y
	select BLK_SCSI_REQUEST
	help
	  Saying Y here will enable generic SG (SCSI generic) v4 support
	  for any block device.

	  Unlike SG v3 (aka block/scsi_ioctl.c drivers/scsi/sg.c), SG v4
	  can handle complicated SCSI commands: tagged variable length cdbs
	  with bidirectional data transfers and generic request/response
	  protocols (e.g. Task Management Functions and SMP in Serial
	  Attached SCSI).

	  This option is required by recent UDEV versions to properly
	  access device serial numbers, etc.

	  If unsure, say Y.

config BLK_DEV_BSGLIB
	bool "Block layer SG support v4 helper lib"
	select BLK_DEV_BSG
	select BLK_SCSI_REQUEST
	help
	  Subsystems will normally enable this if needed. Users will not
	  normally need to manually enable this.

	  If unsure, say N.

config BLK_DEV_INTEGRITY
	bool "Block layer data integrity support"
	select CRC_T10DIF if BLK_DEV_INTEGRITY
	---help---
	Some storage devices allow extra information to be
	stored/retrieved to help protect the data.  The block layer
	data integrity option provides hooks which can be used by
	filesystems to ensure better data integrity.

	Say yes here if you have a storage device that provides the
	T10/SCSI Data Integrity Field or the T13/ATA External Path
	Protection.  If in doubt, say N.

config BLK_DEV_ZONED
	bool "Zoned block device support"
	select MQ_IOSCHED_DEADLINE
	---help---
	Block layer zoned block device support. This option enables
	support for ZAC/ZBC host-managed and host-aware zoned block devices.

	Say yes here if you have a ZAC or ZBC storage device.

config BLK_DEV_THROTTLING
	bool "Block layer bio throttling support"
	depends on BLK_CGROUP=y
	---help---
	Block layer bio throttling support. It can be used to limit
	the IO rate to a device. IO rate policies are per cgroup and
	one needs to mount and use blkio cgroup controller for creating
	cgroups and specifying per device IO rate policies.

	See Documentation/cgroup-v1/blkio-controller.txt for more information.

config BLK_DEV_THROTTLING_LOW
	bool "Block throttling .low limit interface support (EXPERIMENTAL)"
	depends on BLK_DEV_THROTTLING
	---help---
	Add .low limit interface for block throttling. The low limit is a best
	effort limit to prioritize cgroups. Depending on the setting, the limit
	can be used to protect cgroups in terms of bandwidth/iops and better
	utilize disk resource.

	Note, this is an experimental interface and could be changed someday.

config BLK_CMDLINE_PARSER
	bool "Block device command line partition parser"
	---help---
	Enabling this option allows you to specify the partition layout from
	the kernel boot args.  This is typically of use for embedded devices
	which don't otherwise have any standardized method for listing the
	partitions on a block device.

	See Documentation/block/cmdline-partition.txt for more information.

config BLK_WBT
	bool "Enable support for block device writeback throttling"
	---help---
	Enabling this option enables the block layer to throttle buffered
	background writeback from the VM, making it more smooth and having
	less impact on foreground operations. The throttling is done
	dynamically on an algorithm loosely based on CoDel, factoring in
	the realtime performance of the disk.

config BLK_CGROUP_IOLATENCY
	bool "Enable support for latency based cgroup IO protection"
	depends on BLK_CGROUP=y
	---help---
	Enabling this option enables the .latency interface for IO throttling.
	The IO controller will attempt to maintain average IO latencies below
	the configured latency target, throttling anybody with a higher latency
	target than the victimized group.

	Note, this is an experimental interface and could be changed someday.

config BLK_WBT_MQ
	bool "Multiqueue writeback throttling"
	default y
	depends on BLK_WBT
	---help---
	Enable writeback throttling by default on multiqueue devices.
	Multiqueue currently doesn't have support for IO scheduling,
	enabling this option is recommended.

config BLK_DEBUG_FS
	bool "Block layer debugging information in debugfs"
	default y
	depends on DEBUG_FS
	---help---
	Include block layer debugging information in debugfs. This information
	is mostly useful for kernel developers, but it doesn't incur any cost
	at runtime.

	Unless you are building a kernel for a tiny system, you should
	say Y here.

config BLK_DEBUG_FS_ZONED
       bool
       default BLK_DEBUG_FS && BLK_DEV_ZONED

config BLK_SED_OPAL
	bool "Logic for interfacing with Opal enabled SEDs"
	---help---
	Builds Logic for interfacing with Opal enabled controllers.
	Enabling this option enables users to setup/unlock/lock
	Locking ranges for SED devices using the Opal protocol.

menu "Partition Types"

source "block/partitions/Kconfig"

endmenu

endif # BLOCK

config BLOCK_COMPAT
	bool
	depends on BLOCK && COMPAT
	default y

config BLK_MQ_PCI
	bool
	depends on BLOCK && PCI
	default y

config BLK_MQ_VIRTIO
	bool
	depends on BLOCK && VIRTIO
	default y

config BLK_MQ_RDMA
	bool
	depends on BLOCK && INFINIBAND
	default y

config BLK_PM
	def_bool BLOCK && PM

source "block/Kconfig.iosched"
because of timing differences. The counts are reported via debugfs. # Select if the architecture has support for applying RELR relocations. config ARCH_HAS_RELR bool config RELR bool "Use RELR relocation packing" depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR default y help Store the kernel's dynamic relocations in the RELR relocation packing format. Requires a compatible linker (LLD supports this feature), as well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy are compatible). config ARCH_HAS_MEM_ENCRYPT bool config HAVE_SPARSE_SYSCALL_NR bool help An architecture should select this if its syscall numbering is sparse to save space. For example, MIPS architecture has a syscall array with entries at 4000, 5000 and 6000 locations. This option turns on syscall related optimizations for a given architecture. source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" endmenu