xref: /linux/drivers/base/Kconfig (revision 4793dae01f47754e288cdbb3a22581cac2317f2b)
1# SPDX-License-Identifier: GPL-2.0
2menu "Generic Driver Options"
3
4config AUXILIARY_BUS
5	bool
6
7config UEVENT_HELPER
8	bool "Support for uevent helper"
9	help
10	  The uevent helper program is forked by the kernel for
11	  every uevent.
12	  Before the switch to the netlink-based uevent source, this was
13	  used to hook hotplug scripts into kernel device events. It
14	  usually pointed to a shell script at /sbin/hotplug.
15	  This should not be used today, because usual systems create
16	  many events at bootup or device discovery in a very short time
17	  frame. One forked process per event can create so many processes
18	  that it creates a high system load, or on smaller systems
19	  it is known to create out-of-memory situations during bootup.
20
21config UEVENT_HELPER_PATH
22	string "path to uevent helper"
23	depends on UEVENT_HELPER
24	default ""
25	help
26	  To disable user space helper program execution at by default
27	  specify an empty string here. This setting can still be altered
28	  via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
29	  later at runtime.
30
31config DEVTMPFS
32	bool "Maintain a devtmpfs filesystem to mount at /dev"
33	help
34	  This creates a tmpfs/ramfs filesystem instance early at bootup.
35	  In this filesystem, the kernel driver core maintains device
36	  nodes with their default names and permissions for all
37	  registered devices with an assigned major/minor number.
38	  Userspace can modify the filesystem content as needed, add
39	  symlinks, and apply needed permissions.
40	  It provides a fully functional /dev directory, where usually
41	  udev runs on top, managing permissions and adding meaningful
42	  symlinks.
43	  In very limited environments, it may provide a sufficient
44	  functional /dev without any further help. It also allows simple
45	  rescue systems, and reliably handles dynamic major/minor numbers.
46
47	  Notice: if CONFIG_TMPFS isn't enabled, the simpler ramfs
48	  file system will be used instead.
49
50config DEVTMPFS_MOUNT
51	bool "Automount devtmpfs at /dev, after the kernel mounted the rootfs"
52	depends on DEVTMPFS
53	help
54	  This will instruct the kernel to automatically mount the
55	  devtmpfs filesystem at /dev, directly after the kernel has
56	  mounted the root filesystem. The behavior can be overridden
57	  with the commandline parameter: devtmpfs.mount=0|1.
58	  This option does not affect initramfs based booting, here
59	  the devtmpfs filesystem always needs to be mounted manually
60	  after the rootfs is mounted.
61	  With this option enabled, it allows to bring up a system in
62	  rescue mode with init=/bin/sh, even when the /dev directory
63	  on the rootfs is completely empty.
64
65config DEVTMPFS_SAFE
66	bool "Use nosuid,noexec mount options on devtmpfs"
67	depends on DEVTMPFS
68	help
69	  This instructs the kernel to include the MS_NOEXEC and MS_NOSUID mount
70	  flags when mounting devtmpfs.
71
72	  Notice: If enabled, things like /dev/mem cannot be mmapped
73	  with the PROT_EXEC flag. This can break, for example, non-KMS
74	  video drivers.
75
76config DRIVER_DEFERRED_PROBE_TIMEOUT
77	int "Default value for deferred_probe_timeout"
78	default 0 if !MODULES
79	default 10 if MODULES
80	help
81	  Set the default value for the deferred_probe_timeout kernel parameter.
82	  See Documentation/admin-guide/kernel-parameters.txt for a description
83	  of the deferred_probe_timeout kernel parameter.
84
85config STANDALONE
86	bool "Select only drivers that don't need compile-time external firmware"
87	default y
88	help
89	  Select this option if you don't have magic firmware for drivers that
90	  need it.
91
92	  If unsure, say Y.
93
94config PREVENT_FIRMWARE_BUILD
95	bool "Disable drivers features which enable custom firmware building"
96	default y
97	help
98	  Say yes to disable driver features which enable building a custom
99	  driver firmware at kernel build time. These drivers do not use the
100	  kernel firmware API to load firmware (CONFIG_FW_LOADER), instead they
101	  use their own custom loading mechanism. The required firmware is
102	  usually shipped with the driver, building the driver firmware
103	  should only be needed if you have an updated firmware source.
104
105	  Firmware should not be being built as part of kernel, these days
106	  you should always prevent this and say Y here. There are only two
107	  old drivers which enable building of its firmware at kernel build
108	  time:
109
110	    o CONFIG_WANXL through CONFIG_WANXL_BUILD_FIRMWARE
111	    o CONFIG_SCSI_AIC79XX through CONFIG_AIC79XX_BUILD_FIRMWARE
112
113source "drivers/base/firmware_loader/Kconfig"
114
115config WANT_DEV_COREDUMP
116	bool
117	help
118	  Drivers should "select" this option if they desire to use the
119	  device coredump mechanism.
120
121config ALLOW_DEV_COREDUMP
122	bool "Allow device coredump" if EXPERT
123	default y
124	help
125	  This option controls if the device coredump mechanism is available or
126	  not; if disabled, the mechanism will be omitted even if drivers that
127	  can use it are enabled.
128	  Say 'N' for more sensitive systems or systems that don't want
129	  to ever access the information to not have the code, nor keep any
130	  data.
131
132	  If unsure, say Y.
133
134config DEV_COREDUMP
135	bool
136	default y if WANT_DEV_COREDUMP
137	depends on ALLOW_DEV_COREDUMP
138
139config DEBUG_DRIVER
140	bool "Driver Core verbose debug messages"
141	depends on DEBUG_KERNEL
142	help
143	  Say Y here if you want the Driver core to produce a bunch of
144	  debug messages to the system log. Select this if you are having a
145	  problem with the driver core and want to see more of what is
146	  going on.
147
148	  If you are unsure about this, say N here.
149
150config DEBUG_DEVRES
151	bool "Managed device resources verbose debug messages"
152	depends on DEBUG_KERNEL
153	help
154	  This option enables kernel parameter devres.log. If set to
155	  non-zero, devres debug messages are printed. Select this if
156	  you are having a problem with devres or want to debug
157	  resource management for a managed device. devres.log can be
158	  switched on and off from sysfs node.
159
160	  If you are unsure about this, Say N here.
161
162config DEBUG_TEST_DRIVER_REMOVE
163	bool "Test driver remove calls during probe (UNSTABLE)"
164	depends on DEBUG_KERNEL
165	help
166	  Say Y here if you want the Driver core to test driver remove functions
167	  by calling probe, remove, probe. This tests the remove path without
168	  having to unbind the driver or unload the driver module.
169
170	  This option is expected to find errors and may render your system
171	  unusable. You should say N here unless you are explicitly looking to
172	  test this functionality.
173
174config PM_QOS_KUNIT_TEST
175	bool "KUnit Test for PM QoS features" if !KUNIT_ALL_TESTS
176	depends on KUNIT=y
177	default KUNIT_ALL_TESTS
178
179config PM_RUNTIME_KUNIT_TEST
180	tristate "KUnit Tests for runtime PM" if !KUNIT_ALL_TESTS
181	depends on KUNIT
182	depends on PM
183	default KUNIT_ALL_TESTS
184
185config HMEM_REPORTING
186	bool
187	default n
188	depends on NUMA
189	help
190	  Enable reporting for heterogeneous memory access attributes under
191	  their non-uniform memory nodes.
192
193source "drivers/base/test/Kconfig"
194
195config SYS_HYPERVISOR
196	bool
197	default n
198
199config GENERIC_CPU_DEVICES
200	bool
201	default n
202
203config GENERIC_CPU_AUTOPROBE
204	bool
205
206config GENERIC_CPU_VULNERABILITIES
207	bool
208
209config SOC_BUS
210	bool
211	select GLOB
212
213source "drivers/base/regmap/Kconfig"
214
215config DMA_SHARED_BUFFER
216	bool
217	default n
218	select IRQ_WORK
219	help
220	  This option enables the framework for buffer-sharing between
221	  multiple drivers. A buffer is associated with a file using driver
222	  APIs extension; the file's descriptor can then be passed on to other
223	  driver.
224
225config DMA_FENCE_TRACE
226	bool "Enable verbose DMA_FENCE_TRACE messages"
227	depends on DMA_SHARED_BUFFER
228	help
229	  Enable the DMA_FENCE_TRACE printks. This will add extra
230	  spam to the console log, but will make it easier to diagnose
231	  lockup related problems for dma-buffers shared across multiple
232	  devices.
233
234config GENERIC_ARCH_TOPOLOGY
235	bool
236	help
237	  Enable support for architectures common topology code: e.g., parsing
238	  CPU capacity information from DT, usage of such information for
239	  appropriate scaling, sysfs interface for reading capacity values at
240	  runtime.
241
242config GENERIC_ARCH_NUMA
243	bool
244	select NUMA_MEMBLKS
245	help
246	  Enable support for generic NUMA implementation. Currently, RISC-V
247	  and ARM64 use it.
248
249config FW_DEVLINK_SYNC_STATE_TIMEOUT
250	bool "sync_state() behavior defaults to timeout instead of strict"
251	help
252	  This is build time equivalent of adding kernel command line parameter
253	  "fw_devlink.sync_state=timeout". Give up waiting on consumers and
254	  call sync_state() on any devices that haven't yet received their
255	  sync_state() calls after deferred_probe_timeout has expired or by
256	  late_initcall() if !CONFIG_MODULES. You should almost always want to
257	  select N here unless you have already successfully tested with the
258	  command line option on every system/board your kernel is expected to
259	  work on.
260
261endmenu
262