xref: /openbmc/linux/drivers/base/Kconfig (revision 06bfd3c8)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvaldsmenu "Generic Driver Options"
31da177e4SLinus Torvalds
486d56134SMichael Marineauconfig UEVENT_HELPER
586d56134SMichael Marineau	bool "Support for uevent helper"
686d56134SMichael Marineau	default y
76a8d8abbSKay Sievers	help
886d56134SMichael Marineau	  The uevent helper program is forked by the kernel for
96a8d8abbSKay Sievers	  every uevent.
107934779aSKay Sievers	  Before the switch to the netlink-based uevent source, this was
117934779aSKay Sievers	  used to hook hotplug scripts into kernel device events. It
127934779aSKay Sievers	  usually pointed to a shell script at /sbin/hotplug.
137934779aSKay Sievers	  This should not be used today, because usual systems create
147934779aSKay Sievers	  many events at bootup or device discovery in a very short time
157934779aSKay Sievers	  frame. One forked process per event can create so many processes
167934779aSKay Sievers	  that it creates a high system load, or on smaller systems
177934779aSKay Sievers	  it is known to create out-of-memory situations during bootup.
186a8d8abbSKay Sievers
1986d56134SMichael Marineauconfig UEVENT_HELPER_PATH
2086d56134SMichael Marineau	string "path to uevent helper"
2186d56134SMichael Marineau	depends on UEVENT_HELPER
2286d56134SMichael Marineau	default ""
2386d56134SMichael Marineau	help
2486d56134SMichael Marineau	  To disable user space helper program execution at by default
2586d56134SMichael Marineau	  specify an empty string here. This setting can still be altered
26573c9774SMárton Németh	  via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
27573c9774SMárton Németh	  later at runtime.
28573c9774SMárton Németh
292b2af54aSKay Sieversconfig DEVTMPFS
304237e5fdSKay Sievers	bool "Maintain a devtmpfs filesystem to mount at /dev"
312b2af54aSKay Sievers	help
32da5e4ef7SPeter Korsgaard	  This creates a tmpfs/ramfs filesystem instance early at bootup.
334237e5fdSKay Sievers	  In this filesystem, the kernel driver core maintains device
344237e5fdSKay Sievers	  nodes with their default names and permissions for all
354237e5fdSKay Sievers	  registered devices with an assigned major/minor number.
364237e5fdSKay Sievers	  Userspace can modify the filesystem content as needed, add
374237e5fdSKay Sievers	  symlinks, and apply needed permissions.
384237e5fdSKay Sievers	  It provides a fully functional /dev directory, where usually
394237e5fdSKay Sievers	  udev runs on top, managing permissions and adding meaningful
404237e5fdSKay Sievers	  symlinks.
414237e5fdSKay Sievers	  In very limited environments, it may provide a sufficient
424237e5fdSKay Sievers	  functional /dev without any further help. It also allows simple
434237e5fdSKay Sievers	  rescue systems, and reliably handles dynamic major/minor numbers.
442b2af54aSKay Sievers
45da5e4ef7SPeter Korsgaard	  Notice: if CONFIG_TMPFS isn't enabled, the simpler ramfs
46da5e4ef7SPeter Korsgaard	  file system will be used instead.
47da5e4ef7SPeter Korsgaard
482b2af54aSKay Sieversconfig DEVTMPFS_MOUNT
494237e5fdSKay Sievers	bool "Automount devtmpfs at /dev, after the kernel mounted the rootfs"
502b2af54aSKay Sievers	depends on DEVTMPFS
512b2af54aSKay Sievers	help
524237e5fdSKay Sievers	  This will instruct the kernel to automatically mount the
534237e5fdSKay Sievers	  devtmpfs filesystem at /dev, directly after the kernel has
544237e5fdSKay Sievers	  mounted the root filesystem. The behavior can be overridden
554237e5fdSKay Sievers	  with the commandline parameter: devtmpfs.mount=0|1.
564237e5fdSKay Sievers	  This option does not affect initramfs based booting, here
574237e5fdSKay Sievers	  the devtmpfs filesystem always needs to be mounted manually
580feb03afSEmilio López	  after the rootfs is mounted.
594237e5fdSKay Sievers	  With this option enabled, it allows to bring up a system in
604237e5fdSKay Sievers	  rescue mode with init=/bin/sh, even when the /dev directory
614237e5fdSKay Sievers	  on the rootfs is completely empty.
622b2af54aSKay Sievers
631da177e4SLinus Torvaldsconfig STANDALONE
64967857dfSKees Cook	bool "Select only drivers that don't need compile-time external firmware"
651da177e4SLinus Torvalds	default y
661da177e4SLinus Torvalds	help
671da177e4SLinus Torvalds	  Select this option if you don't have magic firmware for drivers that
681da177e4SLinus Torvalds	  need it.
691da177e4SLinus Torvalds
701da177e4SLinus Torvalds	  If unsure, say Y.
711da177e4SLinus Torvalds
721da177e4SLinus Torvaldsconfig PREVENT_FIRMWARE_BUILD
7302c39930SLuis R. Rodriguez	bool "Disable drivers features which enable custom firmware building"
741da177e4SLinus Torvalds	default y
751da177e4SLinus Torvalds	help
7602c39930SLuis R. Rodriguez	  Say yes to disable driver features which enable building a custom
7702c39930SLuis R. Rodriguez	  driver firmware at kernel build time. These drivers do not use the
7802c39930SLuis R. Rodriguez	  kernel firmware API to load firmware (CONFIG_FW_LOADER), instead they
7902c39930SLuis R. Rodriguez	  use their own custom loading mechanism. The required firmware is
8002c39930SLuis R. Rodriguez	  usually shipped with the driver, building the driver firmware
8102c39930SLuis R. Rodriguez	  should only be needed if you have an updated firmware source.
8202c39930SLuis R. Rodriguez
8302c39930SLuis R. Rodriguez	  Firmware should not be being built as part of kernel, these days
8402c39930SLuis R. Rodriguez	  you should always prevent this and say Y here. There are only two
8502c39930SLuis R. Rodriguez	  old drivers which enable building of its firmware at kernel build
8602c39930SLuis R. Rodriguez	  time:
8702c39930SLuis R. Rodriguez
8802c39930SLuis R. Rodriguez	    o CONFIG_WANXL through CONFIG_WANXL_BUILD_FIRMWARE
8902c39930SLuis R. Rodriguez	    o CONFIG_SCSI_AIC79XX through CONFIG_AIC79XX_BUILD_FIRMWARE
9002c39930SLuis R. Rodriguez
91*06bfd3c8SLuis R. Rodriguezsource "drivers/base/firmware_loader/Kconfig"
9202c39930SLuis R. Rodriguez
93833c9545SJohannes Bergconfig WANT_DEV_COREDUMP
94833c9545SJohannes Berg	bool
95833c9545SJohannes Berg	help
96833c9545SJohannes Berg	  Drivers should "select" this option if they desire to use the
97833c9545SJohannes Berg	  device coredump mechanism.
98833c9545SJohannes Berg
99cd3d9ea1SJohannes Bergconfig ALLOW_DEV_COREDUMP
100cd3d9ea1SJohannes Berg	bool "Allow device coredump" if EXPERT
1019c602699SAristeu Rozanski	default y
102833c9545SJohannes Berg	help
1039c602699SAristeu Rozanski	  This option controls if the device coredump mechanism is available or
1049c602699SAristeu Rozanski	  not; if disabled, the mechanism will be omitted even if drivers that
1059c602699SAristeu Rozanski	  can use it are enabled.
1069c602699SAristeu Rozanski	  Say 'N' for more sensitive systems or systems that don't want
1079c602699SAristeu Rozanski	  to ever access the information to not have the code, nor keep any
1089c602699SAristeu Rozanski	  data.
109833c9545SJohannes Berg
1109c602699SAristeu Rozanski	  If unsure, say Y.
111833c9545SJohannes Berg
112833c9545SJohannes Bergconfig DEV_COREDUMP
113833c9545SJohannes Berg	bool
114833c9545SJohannes Berg	default y if WANT_DEV_COREDUMP
115cd3d9ea1SJohannes Berg	depends on ALLOW_DEV_COREDUMP
116833c9545SJohannes Berg
1171da177e4SLinus Torvaldsconfig DEBUG_DRIVER
1181da177e4SLinus Torvalds	bool "Driver Core verbose debug messages"
1191da177e4SLinus Torvalds	depends on DEBUG_KERNEL
1201da177e4SLinus Torvalds	help
1211da177e4SLinus Torvalds	  Say Y here if you want the Driver core to produce a bunch of
1221da177e4SLinus Torvalds	  debug messages to the system log. Select this if you are having a
1231da177e4SLinus Torvalds	  problem with the driver core and want to see more of what is
1241da177e4SLinus Torvalds	  going on.
1251da177e4SLinus Torvalds
1261da177e4SLinus Torvalds	  If you are unsure about this, say N here.
1271da177e4SLinus Torvalds
1289ac7849eSTejun Heoconfig DEBUG_DEVRES
1299ac7849eSTejun Heo	bool "Managed device resources verbose debug messages"
1309ac7849eSTejun Heo	depends on DEBUG_KERNEL
1319ac7849eSTejun Heo	help
1329ac7849eSTejun Heo	  This option enables kernel parameter devres.log. If set to
1339ac7849eSTejun Heo	  non-zero, devres debug messages are printed. Select this if
1349ac7849eSTejun Heo	  you are having a problem with devres or want to debug
1359ac7849eSTejun Heo	  resource management for a managed device. devres.log can be
1369ac7849eSTejun Heo	  switched on and off from sysfs node.
1379ac7849eSTejun Heo
1389ac7849eSTejun Heo	  If you are unsure about this, Say N here.
1399ac7849eSTejun Heo
140bea5b158SRob Herringconfig DEBUG_TEST_DRIVER_REMOVE
141248ff021SLaura Abbott	bool "Test driver remove calls during probe (UNSTABLE)"
142bea5b158SRob Herring	depends on DEBUG_KERNEL
143bea5b158SRob Herring	help
144bea5b158SRob Herring	  Say Y here if you want the Driver core to test driver remove functions
145bea5b158SRob Herring	  by calling probe, remove, probe. This tests the remove path without
146bea5b158SRob Herring	  having to unbind the driver or unload the driver module.
147bea5b158SRob Herring
148248ff021SLaura Abbott	  This option is expected to find errors and may render your system
149248ff021SLaura Abbott	  unusable. You should say N here unless you are explicitly looking to
150248ff021SLaura Abbott	  test this functionality.
151bea5b158SRob Herring
15279543cf2SDmitry Torokhovsource "drivers/base/test/Kconfig"
15379543cf2SDmitry Torokhov
1544039483fSMichael Holzheuconfig SYS_HYPERVISOR
1554039483fSMichael Holzheu	bool
1564039483fSMichael Holzheu	default n
157eba6cd67SRandy Dunlap
1589f13a1fdSBen Hutchingsconfig GENERIC_CPU_DEVICES
1599f13a1fdSBen Hutchings	bool
1609f13a1fdSBen Hutchings	default n
1619f13a1fdSBen Hutchings
16267bad2fdSArd Biesheuvelconfig GENERIC_CPU_AUTOPROBE
16367bad2fdSArd Biesheuvel	bool
16467bad2fdSArd Biesheuvel
16587590ce6SThomas Gleixnerconfig GENERIC_CPU_VULNERABILITIES
16687590ce6SThomas Gleixner	bool
16787590ce6SThomas Gleixner
16874d1d82cSLee Jonesconfig SOC_BUS
16974d1d82cSLee Jones	bool
170c97db7ccSArnd Bergmann	select GLOB
17174d1d82cSLee Jones
172b83a313bSMark Brownsource "drivers/base/regmap/Kconfig"
173b83a313bSMark Brown
174d15bd7eeSSumit Semwalconfig DMA_SHARED_BUFFER
1753b32a592SDave Airlie	bool
176d15bd7eeSSumit Semwal	default n
177d15bd7eeSSumit Semwal	select ANON_INODES
17803e4e0a9SChris Wilson	select IRQ_WORK
179d15bd7eeSSumit Semwal	help
180d15bd7eeSSumit Semwal	  This option enables the framework for buffer-sharing between
181d15bd7eeSSumit Semwal	  multiple drivers. A buffer is associated with a file using driver
182d15bd7eeSSumit Semwal	  APIs extension; the file's descriptor can then be passed on to other
183d15bd7eeSSumit Semwal	  driver.
184d15bd7eeSSumit Semwal
185f54d1867SChris Wilsonconfig DMA_FENCE_TRACE
186f54d1867SChris Wilson	bool "Enable verbose DMA_FENCE_TRACE messages"
187e941759cSMaarten Lankhorst	depends on DMA_SHARED_BUFFER
188e941759cSMaarten Lankhorst	help
189f54d1867SChris Wilson	  Enable the DMA_FENCE_TRACE printks. This will add extra
190e941759cSMaarten Lankhorst	  spam to the console log, but will make it easier to diagnose
191e941759cSMaarten Lankhorst	  lockup related problems for dma-buffers shared across multiple
192e941759cSMaarten Lankhorst	  devices.
193e941759cSMaarten Lankhorst
194f825c736SAneesh Kumar K.Vconfig DMA_CMA
195f825c736SAneesh Kumar K.V	bool "DMA Contiguous Memory Allocator"
196f825c736SAneesh Kumar K.V	depends on HAVE_DMA_CONTIGUOUS && CMA
197c64be2bbSMarek Szyprowski	help
198c64be2bbSMarek Szyprowski	  This enables the Contiguous Memory Allocator which allows drivers
199c64be2bbSMarek Szyprowski	  to allocate big physically-contiguous blocks of memory for use with
200c64be2bbSMarek Szyprowski	  hardware components that do not support I/O map nor scatter-gather.
201c64be2bbSMarek Szyprowski
202f0d6d1f6SJean Delvare	  You can disable CMA by specifying "cma=0" on the kernel's command
203f0d6d1f6SJean Delvare	  line.
204f0d6d1f6SJean Delvare
205c64be2bbSMarek Szyprowski	  For more information see <include/linux/dma-contiguous.h>.
206c64be2bbSMarek Szyprowski	  If unsure, say "n".
207c64be2bbSMarek Szyprowski
208f825c736SAneesh Kumar K.Vif  DMA_CMA
209c64be2bbSMarek Szyprowskicomment "Default contiguous memory area size:"
210c64be2bbSMarek Szyprowski
211c64be2bbSMarek Szyprowskiconfig CMA_SIZE_MBYTES
212c64be2bbSMarek Szyprowski	int "Size in Mega Bytes"
213c64be2bbSMarek Szyprowski	depends on !CMA_SIZE_SEL_PERCENTAGE
214d7be003aSAkinobu Mita	default 0 if X86
215c64be2bbSMarek Szyprowski	default 16
216c64be2bbSMarek Szyprowski	help
217c64be2bbSMarek Szyprowski	  Defines the size (in MiB) of the default memory area for Contiguous
218d7be003aSAkinobu Mita	  Memory Allocator.  If the size of 0 is selected, CMA is disabled by
219d7be003aSAkinobu Mita	  default, but it can be enabled by passing cma=size[MG] to the kernel.
220d7be003aSAkinobu Mita
221c64be2bbSMarek Szyprowski
222c64be2bbSMarek Szyprowskiconfig CMA_SIZE_PERCENTAGE
223c64be2bbSMarek Szyprowski	int "Percentage of total memory"
224c64be2bbSMarek Szyprowski	depends on !CMA_SIZE_SEL_MBYTES
225d7be003aSAkinobu Mita	default 0 if X86
226c64be2bbSMarek Szyprowski	default 10
227c64be2bbSMarek Szyprowski	help
228c64be2bbSMarek Szyprowski	  Defines the size of the default memory area for Contiguous Memory
229c64be2bbSMarek Szyprowski	  Allocator as a percentage of the total memory in the system.
230d7be003aSAkinobu Mita	  If 0 percent is selected, CMA is disabled by default, but it can be
231d7be003aSAkinobu Mita	  enabled by passing cma=size[MG] to the kernel.
232c64be2bbSMarek Szyprowski
233c64be2bbSMarek Szyprowskichoice
234c64be2bbSMarek Szyprowski	prompt "Selected region size"
2355e97f3f9SLaurent Pinchart	default CMA_SIZE_SEL_MBYTES
236c64be2bbSMarek Szyprowski
237c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MBYTES
238c64be2bbSMarek Szyprowski	bool "Use mega bytes value only"
239c64be2bbSMarek Szyprowski
240c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_PERCENTAGE
241c64be2bbSMarek Szyprowski	bool "Use percentage value only"
242c64be2bbSMarek Szyprowski
243c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MIN
244c64be2bbSMarek Szyprowski	bool "Use lower value (minimum)"
245c64be2bbSMarek Szyprowski
246c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MAX
247c64be2bbSMarek Szyprowski	bool "Use higher value (maximum)"
248c64be2bbSMarek Szyprowski
249c64be2bbSMarek Szyprowskiendchoice
250c64be2bbSMarek Szyprowski
251c64be2bbSMarek Szyprowskiconfig CMA_ALIGNMENT
252c64be2bbSMarek Szyprowski	int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
253fe54b1fdSMarc Carino	range 4 12
254c64be2bbSMarek Szyprowski	default 8
255c64be2bbSMarek Szyprowski	help
256c64be2bbSMarek Szyprowski	  DMA mapping framework by default aligns all buffers to the smallest
257c64be2bbSMarek Szyprowski	  PAGE_SIZE order which is greater than or equal to the requested buffer
258c64be2bbSMarek Szyprowski	  size. This works well for buffers up to a few hundreds kilobytes, but
259c64be2bbSMarek Szyprowski	  for larger buffers it just a memory waste. With this parameter you can
260c64be2bbSMarek Szyprowski	  specify the maximum PAGE_SIZE order for contiguous buffers. Larger
261c64be2bbSMarek Szyprowski	  buffers will be aligned only to this specified order. The order is
262c64be2bbSMarek Szyprowski	  expressed as a power of two multiplied by the PAGE_SIZE.
263c64be2bbSMarek Szyprowski
264c64be2bbSMarek Szyprowski	  For example, if your system defaults to 4KiB pages, the order value
265c64be2bbSMarek Szyprowski	  of 8 means that the buffers will be aligned up to 1MiB only.
266c64be2bbSMarek Szyprowski
267c64be2bbSMarek Szyprowski	  If unsure, leave the default value "8".
268c64be2bbSMarek Szyprowski
269c64be2bbSMarek Szyprowskiendif
270c64be2bbSMarek Szyprowski
2712ef7a295SJuri Lelliconfig GENERIC_ARCH_TOPOLOGY
2722ef7a295SJuri Lelli	bool
2732ef7a295SJuri Lelli	help
2742ef7a295SJuri Lelli	  Enable support for architectures common topology code: e.g., parsing
2752ef7a295SJuri Lelli	  CPU capacity information from DT, usage of such information for
2762ef7a295SJuri Lelli	  appropriate scaling, sysfs interface for changing capacity values at
2772ef7a295SJuri Lelli	  runtime.
2782ef7a295SJuri Lelli
279eba6cd67SRandy Dunlapendmenu
280