xref: /openbmc/linux/drivers/base/Kconfig (revision 02c39930)
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
73*02c39930SLuis R. Rodriguez	bool "Disable drivers features which enable custom firmware building"
741da177e4SLinus Torvalds	default y
751da177e4SLinus Torvalds	help
76*02c39930SLuis R. Rodriguez	  Say yes to disable driver features which enable building a custom
77*02c39930SLuis R. Rodriguez	  driver firmware at kernel build time. These drivers do not use the
78*02c39930SLuis R. Rodriguez	  kernel firmware API to load firmware (CONFIG_FW_LOADER), instead they
79*02c39930SLuis R. Rodriguez	  use their own custom loading mechanism. The required firmware is
80*02c39930SLuis R. Rodriguez	  usually shipped with the driver, building the driver firmware
81*02c39930SLuis R. Rodriguez	  should only be needed if you have an updated firmware source.
82*02c39930SLuis R. Rodriguez
83*02c39930SLuis R. Rodriguez	  Firmware should not be being built as part of kernel, these days
84*02c39930SLuis R. Rodriguez	  you should always prevent this and say Y here. There are only two
85*02c39930SLuis R. Rodriguez	  old drivers which enable building of its firmware at kernel build
86*02c39930SLuis R. Rodriguez	  time:
87*02c39930SLuis R. Rodriguez
88*02c39930SLuis R. Rodriguez	    o CONFIG_WANXL through CONFIG_WANXL_BUILD_FIRMWARE
89*02c39930SLuis R. Rodriguez	    o CONFIG_SCSI_AIC79XX through CONFIG_AIC79XX_BUILD_FIRMWARE
90*02c39930SLuis R. Rodriguez
91*02c39930SLuis R. Rodriguezmenu "Firmware loader"
921da177e4SLinus Torvalds
931da177e4SLinus Torvaldsconfig FW_LOADER
94*02c39930SLuis R. Rodriguez	tristate "Firmware loading facility" if EXPERT
95d9b19199SAdrian Bunk	default y
961da177e4SLinus Torvalds	---help---
97*02c39930SLuis R. Rodriguez	  This enables the firmware loading facility in the kernel. The kernel
98*02c39930SLuis R. Rodriguez	  will first look for built-in firmware, if it has any. Next, it will
99*02c39930SLuis R. Rodriguez	  look for the requested firmware in a series of filesystem paths:
100*02c39930SLuis R. Rodriguez
101*02c39930SLuis R. Rodriguez		o firmware_class path module parameter or kernel boot param
102*02c39930SLuis R. Rodriguez		o /lib/firmware/updates/UTS_RELEASE
103*02c39930SLuis R. Rodriguez		o /lib/firmware/updates
104*02c39930SLuis R. Rodriguez		o /lib/firmware/UTS_RELEASE
105*02c39930SLuis R. Rodriguez		o /lib/firmware
106*02c39930SLuis R. Rodriguez
107*02c39930SLuis R. Rodriguez	  Enabling this feature only increases your kernel image by about
108*02c39930SLuis R. Rodriguez	  828 bytes, enable this option unless you are certain you don't
109*02c39930SLuis R. Rodriguez	  need firmware.
110*02c39930SLuis R. Rodriguez
111*02c39930SLuis R. Rodriguez	  You typically want this built-in (=y) but you can also enable this
112*02c39930SLuis R. Rodriguez	  as a module, in which case the firmware_class module will be built.
113*02c39930SLuis R. Rodriguez	  You also want to be sure to enable this built-in if you are going to
114*02c39930SLuis R. Rodriguez	  enable built-in firmware (CONFIG_EXTRA_FIRMWARE).
115*02c39930SLuis R. Rodriguez
116*02c39930SLuis R. Rodriguezif FW_LOADER
1171da177e4SLinus Torvalds
1187f55c733SBenjamin Gilbertconfig EXTRA_FIRMWARE
119*02c39930SLuis R. Rodriguez	string "Build named firmware blobs into the kernel binary"
120d172e7f5SDavid Woodhouse	help
121*02c39930SLuis R. Rodriguez	  Device drivers which require firmware can typically deal with
122*02c39930SLuis R. Rodriguez	  having the kernel load firmware from the various supported
123*02c39930SLuis R. Rodriguez	  /lib/firmware/ paths. This option enables you to build into the
124*02c39930SLuis R. Rodriguez	  kernel firmware files. Built-in firmware searches are preceded
125*02c39930SLuis R. Rodriguez	  over firmware lookups using your filesystem over the supported
126*02c39930SLuis R. Rodriguez	  /lib/firmware paths documented on CONFIG_FW_LOADER.
1270946b2fbSRobin H. Johnson
128*02c39930SLuis R. Rodriguez	  This may be useful for testing or if the firmware is required early on
129*02c39930SLuis R. Rodriguez	  in boot and cannot rely on the firmware being placed in an initrd or
130*02c39930SLuis R. Rodriguez	  initramfs.
1314d2acfbfSDavid Woodhouse
132113647a2Smatt mooney	  This option is a string and takes the (space-separated) names of the
133113647a2Smatt mooney	  firmware files -- the same names that appear in MODULE_FIRMWARE()
1344d2acfbfSDavid Woodhouse	  and request_firmware() in the source. These files should exist under
1354d2acfbfSDavid Woodhouse	  the directory specified by the EXTRA_FIRMWARE_DIR option, which is
1367f55c733SBenjamin Gilbert	  /lib/firmware by default.
1374d2acfbfSDavid Woodhouse
138113647a2Smatt mooney	  For example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", copy
1397f55c733SBenjamin Gilbert	  the usb8388.bin file into /lib/firmware, and build the kernel. Then
1407f55c733SBenjamin Gilbert	  any request_firmware("usb8388.bin") will be satisfied internally
141*02c39930SLuis R. Rodriguez	  inside the kernel without ever looking at your filesystem at runtime.
1424d2acfbfSDavid Woodhouse
1434d2acfbfSDavid Woodhouse	  WARNING: If you include additional firmware files into your binary
144113647a2Smatt mooney	  kernel image that are not available under the terms of the GPL,
1454d2acfbfSDavid Woodhouse	  then it may be a violation of the GPL to distribute the resulting
146113647a2Smatt mooney	  image since it combines both GPL and non-GPL work. You should
1474d2acfbfSDavid Woodhouse	  consult a lawyer of your own before distributing such an image.
1484d2acfbfSDavid Woodhouse
1494d2acfbfSDavid Woodhouseconfig EXTRA_FIRMWARE_DIR
1504d2acfbfSDavid Woodhouse	string "Firmware blobs root directory"
1514d2acfbfSDavid Woodhouse	depends on EXTRA_FIRMWARE != ""
152df85b2d7SMarkus Trippelsdorf	default "/lib/firmware"
1534d2acfbfSDavid Woodhouse	help
1544d2acfbfSDavid Woodhouse	  This option controls the directory in which the kernel build system
1554d2acfbfSDavid Woodhouse	  looks for the firmware files listed in the EXTRA_FIRMWARE option.
1564d2acfbfSDavid Woodhouse
1577b1269f7STakashi Iwaiconfig FW_LOADER_USER_HELPER
158*02c39930SLuis R. Rodriguez	bool "Enable the firmware sysfs fallback mechanism"
159*02c39930SLuis R. Rodriguez	help
160*02c39930SLuis R. Rodriguez	  This option enables a sysfs loading facility to enable firmware
161*02c39930SLuis R. Rodriguez	  loading to the kernel through userspace as a fallback mechanism
162*02c39930SLuis R. Rodriguez	  if and only if the kernel's direct filesystem lookup for the
163*02c39930SLuis R. Rodriguez	  firmware failed using the different /lib/firmware/ paths, or the
164*02c39930SLuis R. Rodriguez	  path specified in the firmware_class path module parameter, or the
165*02c39930SLuis R. Rodriguez	  firmware_class path kernel boot parameter if the firmware_class is
166*02c39930SLuis R. Rodriguez	  built-in. For details on how to work with the sysfs fallback mechanism
167*02c39930SLuis R. Rodriguez	  refer to Documentation/driver-api/firmware/fallback-mechanisms.rst.
168*02c39930SLuis R. Rodriguez
169*02c39930SLuis R. Rodriguez	  The direct filesystem lookup for firmware is always used first now.
170*02c39930SLuis R. Rodriguez
171*02c39930SLuis R. Rodriguez	  If the kernel's direct filesystem lookup for firmware fails to find
172*02c39930SLuis R. Rodriguez	  the requested firmware a sysfs fallback loading facility is made
173*02c39930SLuis R. Rodriguez	  available and userspace is informed about this through uevents.
174*02c39930SLuis R. Rodriguez	  The uevent can be suppressed if the driver explicitly requested it,
175*02c39930SLuis R. Rodriguez	  this is known as the driver using the custom fallback mechanism.
176*02c39930SLuis R. Rodriguez	  If the custom fallback mechanism is used userspace must always
177*02c39930SLuis R. Rodriguez	  acknowledge failure to find firmware as the timeout for the fallback
178*02c39930SLuis R. Rodriguez	  mechanism is disabled, and failed requests will linger forever.
179*02c39930SLuis R. Rodriguez
180*02c39930SLuis R. Rodriguez	  This used to be the default firmware loading facility, and udev used
181*02c39930SLuis R. Rodriguez	  to listen for uvents to load firmware for the kernel. The firmware
182*02c39930SLuis R. Rodriguez	  loading facility functionality in udev has been removed, as such it
183*02c39930SLuis R. Rodriguez	  can no longer be relied upon as a fallback mechanism. Linux no longer
184*02c39930SLuis R. Rodriguez	  relies on or uses a fallback mechanism in userspace. If you need to
185*02c39930SLuis R. Rodriguez	  rely on one refer to the permissively licensed firmwared:
186*02c39930SLuis R. Rodriguez
187*02c39930SLuis R. Rodriguez	  https://github.com/teg/firmwared
188*02c39930SLuis R. Rodriguez
189*02c39930SLuis R. Rodriguez	  Since this was the default firmware loading facility at one point,
190*02c39930SLuis R. Rodriguez	  old userspace may exist which relies upon it, and as such this
191*02c39930SLuis R. Rodriguez	  mechanism can never be removed from the kernel.
192*02c39930SLuis R. Rodriguez
193*02c39930SLuis R. Rodriguez	  You should only enable this functionality if you are certain you
194*02c39930SLuis R. Rodriguez	  require a fallback mechanism and have a userspace mechanism ready to
195*02c39930SLuis R. Rodriguez	  load firmware in case it is not found. One main reason for this may
196*02c39930SLuis R. Rodriguez	  be if you have drivers which require firmware built-in and for
197*02c39930SLuis R. Rodriguez	  whatever reason cannot place the required firmware in initramfs.
198*02c39930SLuis R. Rodriguez	  Another reason kernels may have this feature enabled is to support a
199*02c39930SLuis R. Rodriguez	  driver which explicitly relies on this fallback mechanism. Only two
200*02c39930SLuis R. Rodriguez	  drivers need this today:
201*02c39930SLuis R. Rodriguez
202*02c39930SLuis R. Rodriguez	    o CONFIG_LEDS_LP55XX_COMMON
203*02c39930SLuis R. Rodriguez	    o CONFIG_DELL_RBU
204*02c39930SLuis R. Rodriguez
205*02c39930SLuis R. Rodriguez	  Outside of supporting the above drivers, another reason for needing
206*02c39930SLuis R. Rodriguez	  this may be that your firmware resides outside of the paths the kernel
207*02c39930SLuis R. Rodriguez	  looks for and cannot possibly be specified using the firmware_class
208*02c39930SLuis R. Rodriguez	  path module parameter or kernel firmware_class path boot parameter
209*02c39930SLuis R. Rodriguez	  if firmware_class is built-in.
210*02c39930SLuis R. Rodriguez
211*02c39930SLuis R. Rodriguez	  A modern use case may be to temporarily mount a custom partition
212*02c39930SLuis R. Rodriguez	  during provisioning which is only accessible to userspace, and then
213*02c39930SLuis R. Rodriguez	  to use it to look for and fetch the required firmware. Such type of
214*02c39930SLuis R. Rodriguez	  driver functionality may not even ever be desirable upstream by
215*02c39930SLuis R. Rodriguez	  vendors, and as such is only required to be supported as an interface
216*02c39930SLuis R. Rodriguez	  for provisioning. Since udev's firmware loading facility has been
217*02c39930SLuis R. Rodriguez	  removed you can use firmwared or a fork of it to customize how you
218*02c39930SLuis R. Rodriguez	  want to load firmware based on uevents issued.
219*02c39930SLuis R. Rodriguez
220*02c39930SLuis R. Rodriguez	  Enabling this option will increase your kernel image size by about
221*02c39930SLuis R. Rodriguez	  13436 bytes.
222*02c39930SLuis R. Rodriguez
223*02c39930SLuis R. Rodriguez	  If you are unsure about this, say N here, unless you are Linux
224*02c39930SLuis R. Rodriguez	  distribution and need to support the above two drivers, or you are
225*02c39930SLuis R. Rodriguez	  certain you need to support some really custom firmware loading
226*02c39930SLuis R. Rodriguez	  facility in userspace.
2275a1379e8STakashi Iwai
2285a1379e8STakashi Iwaiconfig FW_LOADER_USER_HELPER_FALLBACK
229*02c39930SLuis R. Rodriguez	bool "Force the firmware sysfs fallback mechanism when possible"
230*02c39930SLuis R. Rodriguez	depends on FW_LOADER_USER_HELPER
2317b1269f7STakashi Iwai	help
232*02c39930SLuis R. Rodriguez	  Enabling this option forces a sysfs userspace fallback mechanism
233*02c39930SLuis R. Rodriguez	  to be used for all firmware requests which explicitly do not disable a
234*02c39930SLuis R. Rodriguez	  a fallback mechanism. Firmware calls which do prohibit a fallback
235*02c39930SLuis R. Rodriguez	  mechanism is request_firmware_direct(). This option is kept for
236*02c39930SLuis R. Rodriguez          backward compatibility purposes given this precise mechanism can also
237*02c39930SLuis R. Rodriguez	  be enabled by setting the proc sysctl value to true:
238*02c39930SLuis R. Rodriguez
239*02c39930SLuis R. Rodriguez	       /proc/sys/kernel/firmware_config/force_sysfs_fallback
2405a1379e8STakashi Iwai
2415a1379e8STakashi Iwai	  If you are unsure about this, say N here.
2427b1269f7STakashi Iwai
243*02c39930SLuis R. Rodriguezendif # FW_LOADER
244*02c39930SLuis R. Rodriguezendmenu
245*02c39930SLuis R. Rodriguez
246833c9545SJohannes Bergconfig WANT_DEV_COREDUMP
247833c9545SJohannes Berg	bool
248833c9545SJohannes Berg	help
249833c9545SJohannes Berg	  Drivers should "select" this option if they desire to use the
250833c9545SJohannes Berg	  device coredump mechanism.
251833c9545SJohannes Berg
252cd3d9ea1SJohannes Bergconfig ALLOW_DEV_COREDUMP
253cd3d9ea1SJohannes Berg	bool "Allow device coredump" if EXPERT
2549c602699SAristeu Rozanski	default y
255833c9545SJohannes Berg	help
2569c602699SAristeu Rozanski	  This option controls if the device coredump mechanism is available or
2579c602699SAristeu Rozanski	  not; if disabled, the mechanism will be omitted even if drivers that
2589c602699SAristeu Rozanski	  can use it are enabled.
2599c602699SAristeu Rozanski	  Say 'N' for more sensitive systems or systems that don't want
2609c602699SAristeu Rozanski	  to ever access the information to not have the code, nor keep any
2619c602699SAristeu Rozanski	  data.
262833c9545SJohannes Berg
2639c602699SAristeu Rozanski	  If unsure, say Y.
264833c9545SJohannes Berg
265833c9545SJohannes Bergconfig DEV_COREDUMP
266833c9545SJohannes Berg	bool
267833c9545SJohannes Berg	default y if WANT_DEV_COREDUMP
268cd3d9ea1SJohannes Berg	depends on ALLOW_DEV_COREDUMP
269833c9545SJohannes Berg
2701da177e4SLinus Torvaldsconfig DEBUG_DRIVER
2711da177e4SLinus Torvalds	bool "Driver Core verbose debug messages"
2721da177e4SLinus Torvalds	depends on DEBUG_KERNEL
2731da177e4SLinus Torvalds	help
2741da177e4SLinus Torvalds	  Say Y here if you want the Driver core to produce a bunch of
2751da177e4SLinus Torvalds	  debug messages to the system log. Select this if you are having a
2761da177e4SLinus Torvalds	  problem with the driver core and want to see more of what is
2771da177e4SLinus Torvalds	  going on.
2781da177e4SLinus Torvalds
2791da177e4SLinus Torvalds	  If you are unsure about this, say N here.
2801da177e4SLinus Torvalds
2819ac7849eSTejun Heoconfig DEBUG_DEVRES
2829ac7849eSTejun Heo	bool "Managed device resources verbose debug messages"
2839ac7849eSTejun Heo	depends on DEBUG_KERNEL
2849ac7849eSTejun Heo	help
2859ac7849eSTejun Heo	  This option enables kernel parameter devres.log. If set to
2869ac7849eSTejun Heo	  non-zero, devres debug messages are printed. Select this if
2879ac7849eSTejun Heo	  you are having a problem with devres or want to debug
2889ac7849eSTejun Heo	  resource management for a managed device. devres.log can be
2899ac7849eSTejun Heo	  switched on and off from sysfs node.
2909ac7849eSTejun Heo
2919ac7849eSTejun Heo	  If you are unsure about this, Say N here.
2929ac7849eSTejun Heo
293bea5b158SRob Herringconfig DEBUG_TEST_DRIVER_REMOVE
294248ff021SLaura Abbott	bool "Test driver remove calls during probe (UNSTABLE)"
295bea5b158SRob Herring	depends on DEBUG_KERNEL
296bea5b158SRob Herring	help
297bea5b158SRob Herring	  Say Y here if you want the Driver core to test driver remove functions
298bea5b158SRob Herring	  by calling probe, remove, probe. This tests the remove path without
299bea5b158SRob Herring	  having to unbind the driver or unload the driver module.
300bea5b158SRob Herring
301248ff021SLaura Abbott	  This option is expected to find errors and may render your system
302248ff021SLaura Abbott	  unusable. You should say N here unless you are explicitly looking to
303248ff021SLaura Abbott	  test this functionality.
304bea5b158SRob Herring
30579543cf2SDmitry Torokhovsource "drivers/base/test/Kconfig"
30679543cf2SDmitry Torokhov
3074039483fSMichael Holzheuconfig SYS_HYPERVISOR
3084039483fSMichael Holzheu	bool
3094039483fSMichael Holzheu	default n
310eba6cd67SRandy Dunlap
3119f13a1fdSBen Hutchingsconfig GENERIC_CPU_DEVICES
3129f13a1fdSBen Hutchings	bool
3139f13a1fdSBen Hutchings	default n
3149f13a1fdSBen Hutchings
31567bad2fdSArd Biesheuvelconfig GENERIC_CPU_AUTOPROBE
31667bad2fdSArd Biesheuvel	bool
31767bad2fdSArd Biesheuvel
31887590ce6SThomas Gleixnerconfig GENERIC_CPU_VULNERABILITIES
31987590ce6SThomas Gleixner	bool
32087590ce6SThomas Gleixner
32174d1d82cSLee Jonesconfig SOC_BUS
32274d1d82cSLee Jones	bool
323c97db7ccSArnd Bergmann	select GLOB
32474d1d82cSLee Jones
325b83a313bSMark Brownsource "drivers/base/regmap/Kconfig"
326b83a313bSMark Brown
327d15bd7eeSSumit Semwalconfig DMA_SHARED_BUFFER
3283b32a592SDave Airlie	bool
329d15bd7eeSSumit Semwal	default n
330d15bd7eeSSumit Semwal	select ANON_INODES
33103e4e0a9SChris Wilson	select IRQ_WORK
332d15bd7eeSSumit Semwal	help
333d15bd7eeSSumit Semwal	  This option enables the framework for buffer-sharing between
334d15bd7eeSSumit Semwal	  multiple drivers. A buffer is associated with a file using driver
335d15bd7eeSSumit Semwal	  APIs extension; the file's descriptor can then be passed on to other
336d15bd7eeSSumit Semwal	  driver.
337d15bd7eeSSumit Semwal
338f54d1867SChris Wilsonconfig DMA_FENCE_TRACE
339f54d1867SChris Wilson	bool "Enable verbose DMA_FENCE_TRACE messages"
340e941759cSMaarten Lankhorst	depends on DMA_SHARED_BUFFER
341e941759cSMaarten Lankhorst	help
342f54d1867SChris Wilson	  Enable the DMA_FENCE_TRACE printks. This will add extra
343e941759cSMaarten Lankhorst	  spam to the console log, but will make it easier to diagnose
344e941759cSMaarten Lankhorst	  lockup related problems for dma-buffers shared across multiple
345e941759cSMaarten Lankhorst	  devices.
346e941759cSMaarten Lankhorst
347f825c736SAneesh Kumar K.Vconfig DMA_CMA
348f825c736SAneesh Kumar K.V	bool "DMA Contiguous Memory Allocator"
349f825c736SAneesh Kumar K.V	depends on HAVE_DMA_CONTIGUOUS && CMA
350c64be2bbSMarek Szyprowski	help
351c64be2bbSMarek Szyprowski	  This enables the Contiguous Memory Allocator which allows drivers
352c64be2bbSMarek Szyprowski	  to allocate big physically-contiguous blocks of memory for use with
353c64be2bbSMarek Szyprowski	  hardware components that do not support I/O map nor scatter-gather.
354c64be2bbSMarek Szyprowski
355f0d6d1f6SJean Delvare	  You can disable CMA by specifying "cma=0" on the kernel's command
356f0d6d1f6SJean Delvare	  line.
357f0d6d1f6SJean Delvare
358c64be2bbSMarek Szyprowski	  For more information see <include/linux/dma-contiguous.h>.
359c64be2bbSMarek Szyprowski	  If unsure, say "n".
360c64be2bbSMarek Szyprowski
361f825c736SAneesh Kumar K.Vif  DMA_CMA
362c64be2bbSMarek Szyprowskicomment "Default contiguous memory area size:"
363c64be2bbSMarek Szyprowski
364c64be2bbSMarek Szyprowskiconfig CMA_SIZE_MBYTES
365c64be2bbSMarek Szyprowski	int "Size in Mega Bytes"
366c64be2bbSMarek Szyprowski	depends on !CMA_SIZE_SEL_PERCENTAGE
367d7be003aSAkinobu Mita	default 0 if X86
368c64be2bbSMarek Szyprowski	default 16
369c64be2bbSMarek Szyprowski	help
370c64be2bbSMarek Szyprowski	  Defines the size (in MiB) of the default memory area for Contiguous
371d7be003aSAkinobu Mita	  Memory Allocator.  If the size of 0 is selected, CMA is disabled by
372d7be003aSAkinobu Mita	  default, but it can be enabled by passing cma=size[MG] to the kernel.
373d7be003aSAkinobu Mita
374c64be2bbSMarek Szyprowski
375c64be2bbSMarek Szyprowskiconfig CMA_SIZE_PERCENTAGE
376c64be2bbSMarek Szyprowski	int "Percentage of total memory"
377c64be2bbSMarek Szyprowski	depends on !CMA_SIZE_SEL_MBYTES
378d7be003aSAkinobu Mita	default 0 if X86
379c64be2bbSMarek Szyprowski	default 10
380c64be2bbSMarek Szyprowski	help
381c64be2bbSMarek Szyprowski	  Defines the size of the default memory area for Contiguous Memory
382c64be2bbSMarek Szyprowski	  Allocator as a percentage of the total memory in the system.
383d7be003aSAkinobu Mita	  If 0 percent is selected, CMA is disabled by default, but it can be
384d7be003aSAkinobu Mita	  enabled by passing cma=size[MG] to the kernel.
385c64be2bbSMarek Szyprowski
386c64be2bbSMarek Szyprowskichoice
387c64be2bbSMarek Szyprowski	prompt "Selected region size"
3885e97f3f9SLaurent Pinchart	default CMA_SIZE_SEL_MBYTES
389c64be2bbSMarek Szyprowski
390c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MBYTES
391c64be2bbSMarek Szyprowski	bool "Use mega bytes value only"
392c64be2bbSMarek Szyprowski
393c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_PERCENTAGE
394c64be2bbSMarek Szyprowski	bool "Use percentage value only"
395c64be2bbSMarek Szyprowski
396c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MIN
397c64be2bbSMarek Szyprowski	bool "Use lower value (minimum)"
398c64be2bbSMarek Szyprowski
399c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MAX
400c64be2bbSMarek Szyprowski	bool "Use higher value (maximum)"
401c64be2bbSMarek Szyprowski
402c64be2bbSMarek Szyprowskiendchoice
403c64be2bbSMarek Szyprowski
404c64be2bbSMarek Szyprowskiconfig CMA_ALIGNMENT
405c64be2bbSMarek Szyprowski	int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
406fe54b1fdSMarc Carino	range 4 12
407c64be2bbSMarek Szyprowski	default 8
408c64be2bbSMarek Szyprowski	help
409c64be2bbSMarek Szyprowski	  DMA mapping framework by default aligns all buffers to the smallest
410c64be2bbSMarek Szyprowski	  PAGE_SIZE order which is greater than or equal to the requested buffer
411c64be2bbSMarek Szyprowski	  size. This works well for buffers up to a few hundreds kilobytes, but
412c64be2bbSMarek Szyprowski	  for larger buffers it just a memory waste. With this parameter you can
413c64be2bbSMarek Szyprowski	  specify the maximum PAGE_SIZE order for contiguous buffers. Larger
414c64be2bbSMarek Szyprowski	  buffers will be aligned only to this specified order. The order is
415c64be2bbSMarek Szyprowski	  expressed as a power of two multiplied by the PAGE_SIZE.
416c64be2bbSMarek Szyprowski
417c64be2bbSMarek Szyprowski	  For example, if your system defaults to 4KiB pages, the order value
418c64be2bbSMarek Szyprowski	  of 8 means that the buffers will be aligned up to 1MiB only.
419c64be2bbSMarek Szyprowski
420c64be2bbSMarek Szyprowski	  If unsure, leave the default value "8".
421c64be2bbSMarek Szyprowski
422c64be2bbSMarek Szyprowskiendif
423c64be2bbSMarek Szyprowski
4242ef7a295SJuri Lelliconfig GENERIC_ARCH_TOPOLOGY
4252ef7a295SJuri Lelli	bool
4262ef7a295SJuri Lelli	help
4272ef7a295SJuri Lelli	  Enable support for architectures common topology code: e.g., parsing
4282ef7a295SJuri Lelli	  CPU capacity information from DT, usage of such information for
4292ef7a295SJuri Lelli	  appropriate scaling, sysfs interface for changing capacity values at
4302ef7a295SJuri Lelli	  runtime.
4312ef7a295SJuri Lelli
432eba6cd67SRandy Dunlapendmenu
433