Kconfig 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. # SPDX-License-Identifier: GPL-2.0
  2. menu "Generic Driver Options"
  3. config UEVENT_HELPER
  4. bool "Support for uevent helper"
  5. default y
  6. help
  7. The uevent helper program is forked by the kernel for
  8. every uevent.
  9. Before the switch to the netlink-based uevent source, this was
  10. used to hook hotplug scripts into kernel device events. It
  11. usually pointed to a shell script at /sbin/hotplug.
  12. This should not be used today, because usual systems create
  13. many events at bootup or device discovery in a very short time
  14. frame. One forked process per event can create so many processes
  15. that it creates a high system load, or on smaller systems
  16. it is known to create out-of-memory situations during bootup.
  17. config UEVENT_HELPER_PATH
  18. string "path to uevent helper"
  19. depends on UEVENT_HELPER
  20. default ""
  21. help
  22. To disable user space helper program execution at by default
  23. specify an empty string here. This setting can still be altered
  24. via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
  25. later at runtime.
  26. config DEVTMPFS
  27. bool "Maintain a devtmpfs filesystem to mount at /dev"
  28. help
  29. This creates a tmpfs/ramfs filesystem instance early at bootup.
  30. In this filesystem, the kernel driver core maintains device
  31. nodes with their default names and permissions for all
  32. registered devices with an assigned major/minor number.
  33. Userspace can modify the filesystem content as needed, add
  34. symlinks, and apply needed permissions.
  35. It provides a fully functional /dev directory, where usually
  36. udev runs on top, managing permissions and adding meaningful
  37. symlinks.
  38. In very limited environments, it may provide a sufficient
  39. functional /dev without any further help. It also allows simple
  40. rescue systems, and reliably handles dynamic major/minor numbers.
  41. Notice: if CONFIG_TMPFS isn't enabled, the simpler ramfs
  42. file system will be used instead.
  43. config DEVTMPFS_MOUNT
  44. bool "Automount devtmpfs at /dev, after the kernel mounted the rootfs"
  45. depends on DEVTMPFS
  46. help
  47. This will instruct the kernel to automatically mount the
  48. devtmpfs filesystem at /dev, directly after the kernel has
  49. mounted the root filesystem. The behavior can be overridden
  50. with the commandline parameter: devtmpfs.mount=0|1.
  51. This option does not affect initramfs based booting, here
  52. the devtmpfs filesystem always needs to be mounted manually
  53. after the rootfs is mounted.
  54. With this option enabled, it allows to bring up a system in
  55. rescue mode with init=/bin/sh, even when the /dev directory
  56. on the rootfs is completely empty.
  57. config STANDALONE
  58. bool "Select only drivers that don't need compile-time external firmware"
  59. default y
  60. help
  61. Select this option if you don't have magic firmware for drivers that
  62. need it.
  63. If unsure, say Y.
  64. config PREVENT_FIRMWARE_BUILD
  65. bool "Prevent firmware from being built"
  66. default y
  67. help
  68. Say yes to avoid building firmware. Firmware is usually shipped
  69. with the driver and only when updating the firmware should a
  70. rebuild be made.
  71. If unsure, say Y here.
  72. config FW_LOADER
  73. tristate "Userspace firmware loading support" if EXPERT
  74. default y
  75. ---help---
  76. This option is provided for the case where none of the in-tree modules
  77. require userspace firmware loading support, but a module built
  78. out-of-tree does.
  79. config FIRMWARE_IN_KERNEL
  80. bool "Include in-kernel firmware blobs in kernel binary"
  81. depends on FW_LOADER
  82. default y
  83. help
  84. Various drivers in the kernel source tree may require firmware,
  85. which is generally available in your distribution's linux-firmware
  86. package.
  87. The linux-firmware package should install firmware into
  88. /lib/firmware/ on your system, so they can be loaded by userspace
  89. helpers on request.
  90. Enabling this option will build each required firmware blob
  91. specified by EXTRA_FIRMWARE into the kernel directly, where
  92. request_firmware() will find them without having to call out to
  93. userspace. This may be useful if your root file system requires a
  94. device that uses such firmware and you do not wish to use an
  95. initrd.
  96. This single option controls the inclusion of firmware for
  97. every driver that uses request_firmware(), which avoids a
  98. proliferation of 'Include firmware for xxx device' options.
  99. Say 'N' and let firmware be loaded from userspace.
  100. config EXTRA_FIRMWARE
  101. string "External firmware blobs to build into the kernel binary"
  102. depends on FW_LOADER
  103. help
  104. This option allows firmware to be built into the kernel for the case
  105. where the user either cannot or doesn't want to provide it from
  106. userspace at runtime (for example, when the firmware in question is
  107. required for accessing the boot device, and the user doesn't want to
  108. use an initrd).
  109. This option is a string and takes the (space-separated) names of the
  110. firmware files -- the same names that appear in MODULE_FIRMWARE()
  111. and request_firmware() in the source. These files should exist under
  112. the directory specified by the EXTRA_FIRMWARE_DIR option, which is
  113. by default the firmware subdirectory of the kernel source tree.
  114. For example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", copy
  115. the usb8388.bin file into the firmware directory, and build the kernel.
  116. Then any request_firmware("usb8388.bin") will be satisfied internally
  117. without needing to call out to userspace.
  118. WARNING: If you include additional firmware files into your binary
  119. kernel image that are not available under the terms of the GPL,
  120. then it may be a violation of the GPL to distribute the resulting
  121. image since it combines both GPL and non-GPL work. You should
  122. consult a lawyer of your own before distributing such an image.
  123. config EXTRA_FIRMWARE_DIR
  124. string "Firmware blobs root directory"
  125. depends on EXTRA_FIRMWARE != ""
  126. default "/lib/firmware"
  127. help
  128. This option controls the directory in which the kernel build system
  129. looks for the firmware files listed in the EXTRA_FIRMWARE option.
  130. config FW_LOADER_USER_HELPER
  131. bool
  132. config FW_LOADER_USER_HELPER_FALLBACK
  133. bool "Fallback user-helper invocation for firmware loading"
  134. depends on FW_LOADER
  135. select FW_LOADER_USER_HELPER
  136. help
  137. This option enables / disables the invocation of user-helper
  138. (e.g. udev) for loading firmware files as a fallback after the
  139. direct file loading in kernel fails. The user-mode helper is
  140. no longer required unless you have a special firmware file that
  141. resides in a non-standard path. Moreover, the udev support has
  142. been deprecated upstream.
  143. If you are unsure about this, say N here.
  144. config WANT_DEV_COREDUMP
  145. bool
  146. help
  147. Drivers should "select" this option if they desire to use the
  148. device coredump mechanism.
  149. config ALLOW_DEV_COREDUMP
  150. bool "Allow device coredump" if EXPERT
  151. default y
  152. help
  153. This option controls if the device coredump mechanism is available or
  154. not; if disabled, the mechanism will be omitted even if drivers that
  155. can use it are enabled.
  156. Say 'N' for more sensitive systems or systems that don't want
  157. to ever access the information to not have the code, nor keep any
  158. data.
  159. If unsure, say Y.
  160. config DEV_COREDUMP
  161. bool
  162. default y if WANT_DEV_COREDUMP
  163. depends on ALLOW_DEV_COREDUMP
  164. config DEBUG_DRIVER
  165. bool "Driver Core verbose debug messages"
  166. depends on DEBUG_KERNEL
  167. help
  168. Say Y here if you want the Driver core to produce a bunch of
  169. debug messages to the system log. Select this if you are having a
  170. problem with the driver core and want to see more of what is
  171. going on.
  172. If you are unsure about this, say N here.
  173. config DEBUG_DEVRES
  174. bool "Managed device resources verbose debug messages"
  175. depends on DEBUG_KERNEL
  176. help
  177. This option enables kernel parameter devres.log. If set to
  178. non-zero, devres debug messages are printed. Select this if
  179. you are having a problem with devres or want to debug
  180. resource management for a managed device. devres.log can be
  181. switched on and off from sysfs node.
  182. If you are unsure about this, Say N here.
  183. config DEBUG_TEST_DRIVER_REMOVE
  184. bool "Test driver remove calls during probe (UNSTABLE)"
  185. depends on DEBUG_KERNEL
  186. help
  187. Say Y here if you want the Driver core to test driver remove functions
  188. by calling probe, remove, probe. This tests the remove path without
  189. having to unbind the driver or unload the driver module.
  190. This option is expected to find errors and may render your system
  191. unusable. You should say N here unless you are explicitly looking to
  192. test this functionality.
  193. source "drivers/base/test/Kconfig"
  194. config SYS_HYPERVISOR
  195. bool
  196. default n
  197. config GENERIC_CPU_DEVICES
  198. bool
  199. default n
  200. config GENERIC_CPU_AUTOPROBE
  201. bool
  202. config GENERIC_CPU_VULNERABILITIES
  203. bool
  204. config SOC_BUS
  205. bool
  206. select GLOB
  207. source "drivers/base/regmap/Kconfig"
  208. config DMA_SHARED_BUFFER
  209. bool
  210. default n
  211. select IRQ_WORK
  212. help
  213. This option enables the framework for buffer-sharing between
  214. multiple drivers. A buffer is associated with a file using driver
  215. APIs extension; the file's descriptor can then be passed on to other
  216. driver.
  217. config DMA_FENCE_TRACE
  218. bool "Enable verbose DMA_FENCE_TRACE messages"
  219. depends on DMA_SHARED_BUFFER
  220. help
  221. Enable the DMA_FENCE_TRACE printks. This will add extra
  222. spam to the console log, but will make it easier to diagnose
  223. lockup related problems for dma-buffers shared across multiple
  224. devices.
  225. config DMA_CMA
  226. bool "DMA Contiguous Memory Allocator"
  227. depends on HAVE_DMA_CONTIGUOUS && CMA
  228. help
  229. This enables the Contiguous Memory Allocator which allows drivers
  230. to allocate big physically-contiguous blocks of memory for use with
  231. hardware components that do not support I/O map nor scatter-gather.
  232. You can disable CMA by specifying "cma=0" on the kernel's command
  233. line.
  234. For more information see <include/linux/dma-contiguous.h>.
  235. If unsure, say "n".
  236. if DMA_CMA
  237. comment "Default contiguous memory area size:"
  238. config CMA_SIZE_MBYTES
  239. int "Size in Mega Bytes"
  240. depends on !CMA_SIZE_SEL_PERCENTAGE
  241. default 0 if X86
  242. default 16
  243. help
  244. Defines the size (in MiB) of the default memory area for Contiguous
  245. Memory Allocator. If the size of 0 is selected, CMA is disabled by
  246. default, but it can be enabled by passing cma=size[MG] to the kernel.
  247. config CMA_SIZE_PERCENTAGE
  248. int "Percentage of total memory"
  249. depends on !CMA_SIZE_SEL_MBYTES
  250. default 0 if X86
  251. default 10
  252. help
  253. Defines the size of the default memory area for Contiguous Memory
  254. Allocator as a percentage of the total memory in the system.
  255. If 0 percent is selected, CMA is disabled by default, but it can be
  256. enabled by passing cma=size[MG] to the kernel.
  257. choice
  258. prompt "Selected region size"
  259. default CMA_SIZE_SEL_MBYTES
  260. config CMA_SIZE_SEL_MBYTES
  261. bool "Use mega bytes value only"
  262. config CMA_SIZE_SEL_PERCENTAGE
  263. bool "Use percentage value only"
  264. config CMA_SIZE_SEL_MIN
  265. bool "Use lower value (minimum)"
  266. config CMA_SIZE_SEL_MAX
  267. bool "Use higher value (maximum)"
  268. endchoice
  269. config CMA_ALIGNMENT
  270. int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
  271. range 4 12
  272. default 8
  273. help
  274. DMA mapping framework by default aligns all buffers to the smallest
  275. PAGE_SIZE order which is greater than or equal to the requested buffer
  276. size. This works well for buffers up to a few hundreds kilobytes, but
  277. for larger buffers it just a memory waste. With this parameter you can
  278. specify the maximum PAGE_SIZE order for contiguous buffers. Larger
  279. buffers will be aligned only to this specified order. The order is
  280. expressed as a power of two multiplied by the PAGE_SIZE.
  281. For example, if your system defaults to 4KiB pages, the order value
  282. of 8 means that the buffers will be aligned up to 1MiB only.
  283. If unsure, leave the default value "8".
  284. endif
  285. config GENERIC_ARCH_TOPOLOGY
  286. bool
  287. help
  288. Enable support for architectures common topology code: e.g., parsing
  289. CPU capacity information from DT, usage of such information for
  290. appropriate scaling, sysfs interface for changing capacity values at
  291. runtime.
  292. endmenu