Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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 EXTRA_FIRMWARE
  80. string "External firmware blobs to build into the kernel binary"
  81. depends on FW_LOADER
  82. help
  83. Various drivers in the kernel source tree may require firmware,
  84. which is generally available in your distribution's linux-firmware
  85. package.
  86. The linux-firmware package should install firmware into
  87. /lib/firmware/ on your system, so they can be loaded by userspace
  88. helpers on request.
  89. This option allows firmware to be built into the kernel for the case
  90. where the user either cannot or doesn't want to provide it from
  91. userspace at runtime (for example, when the firmware in question is
  92. required for accessing the boot device, and the user doesn't want to
  93. use an initrd).
  94. This option is a string and takes the (space-separated) names of the
  95. firmware files -- the same names that appear in MODULE_FIRMWARE()
  96. and request_firmware() in the source. These files should exist under
  97. the directory specified by the EXTRA_FIRMWARE_DIR option, which is
  98. /lib/firmware by default.
  99. For example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", copy
  100. the usb8388.bin file into /lib/firmware, and build the kernel. Then
  101. any request_firmware("usb8388.bin") will be satisfied internally
  102. without needing to call out to userspace.
  103. WARNING: If you include additional firmware files into your binary
  104. kernel image that are not available under the terms of the GPL,
  105. then it may be a violation of the GPL to distribute the resulting
  106. image since it combines both GPL and non-GPL work. You should
  107. consult a lawyer of your own before distributing such an image.
  108. config EXTRA_FIRMWARE_DIR
  109. string "Firmware blobs root directory"
  110. depends on EXTRA_FIRMWARE != ""
  111. default "/lib/firmware"
  112. help
  113. This option controls the directory in which the kernel build system
  114. looks for the firmware files listed in the EXTRA_FIRMWARE option.
  115. config FW_LOADER_USER_HELPER
  116. bool
  117. config FW_LOADER_USER_HELPER_FALLBACK
  118. bool "Fallback user-helper invocation for firmware loading"
  119. depends on FW_LOADER
  120. select FW_LOADER_USER_HELPER
  121. help
  122. This option enables / disables the invocation of user-helper
  123. (e.g. udev) for loading firmware files as a fallback after the
  124. direct file loading in kernel fails. The user-mode helper is
  125. no longer required unless you have a special firmware file that
  126. resides in a non-standard path. Moreover, the udev support has
  127. been deprecated upstream.
  128. If you are unsure about this, say N here.
  129. config WANT_DEV_COREDUMP
  130. bool
  131. help
  132. Drivers should "select" this option if they desire to use the
  133. device coredump mechanism.
  134. config ALLOW_DEV_COREDUMP
  135. bool "Allow device coredump" if EXPERT
  136. default y
  137. help
  138. This option controls if the device coredump mechanism is available or
  139. not; if disabled, the mechanism will be omitted even if drivers that
  140. can use it are enabled.
  141. Say 'N' for more sensitive systems or systems that don't want
  142. to ever access the information to not have the code, nor keep any
  143. data.
  144. If unsure, say Y.
  145. config DEV_COREDUMP
  146. bool
  147. default y if WANT_DEV_COREDUMP
  148. depends on ALLOW_DEV_COREDUMP
  149. config DEBUG_DRIVER
  150. bool "Driver Core verbose debug messages"
  151. depends on DEBUG_KERNEL
  152. help
  153. Say Y here if you want the Driver core to produce a bunch of
  154. debug messages to the system log. Select this if you are having a
  155. problem with the driver core and want to see more of what is
  156. going on.
  157. If you are unsure about this, say N here.
  158. config DEBUG_DEVRES
  159. bool "Managed device resources verbose debug messages"
  160. depends on DEBUG_KERNEL
  161. help
  162. This option enables kernel parameter devres.log. If set to
  163. non-zero, devres debug messages are printed. Select this if
  164. you are having a problem with devres or want to debug
  165. resource management for a managed device. devres.log can be
  166. switched on and off from sysfs node.
  167. If you are unsure about this, Say N here.
  168. config DEBUG_TEST_DRIVER_REMOVE
  169. bool "Test driver remove calls during probe (UNSTABLE)"
  170. depends on DEBUG_KERNEL
  171. help
  172. Say Y here if you want the Driver core to test driver remove functions
  173. by calling probe, remove, probe. This tests the remove path without
  174. having to unbind the driver or unload the driver module.
  175. This option is expected to find errors and may render your system
  176. unusable. You should say N here unless you are explicitly looking to
  177. test this functionality.
  178. source "drivers/base/test/Kconfig"
  179. config SYS_HYPERVISOR
  180. bool
  181. default n
  182. config GENERIC_CPU_DEVICES
  183. bool
  184. default n
  185. config GENERIC_CPU_AUTOPROBE
  186. bool
  187. config GENERIC_CPU_VULNERABILITIES
  188. bool
  189. config SOC_BUS
  190. bool
  191. select GLOB
  192. source "drivers/base/regmap/Kconfig"
  193. config DMA_SHARED_BUFFER
  194. bool
  195. default n
  196. select ANON_INODES
  197. select IRQ_WORK
  198. help
  199. This option enables the framework for buffer-sharing between
  200. multiple drivers. A buffer is associated with a file using driver
  201. APIs extension; the file's descriptor can then be passed on to other
  202. driver.
  203. config DMA_FENCE_TRACE
  204. bool "Enable verbose DMA_FENCE_TRACE messages"
  205. depends on DMA_SHARED_BUFFER
  206. help
  207. Enable the DMA_FENCE_TRACE printks. This will add extra
  208. spam to the console log, but will make it easier to diagnose
  209. lockup related problems for dma-buffers shared across multiple
  210. devices.
  211. config DMA_CMA
  212. bool "DMA Contiguous Memory Allocator"
  213. depends on HAVE_DMA_CONTIGUOUS && CMA
  214. help
  215. This enables the Contiguous Memory Allocator which allows drivers
  216. to allocate big physically-contiguous blocks of memory for use with
  217. hardware components that do not support I/O map nor scatter-gather.
  218. You can disable CMA by specifying "cma=0" on the kernel's command
  219. line.
  220. For more information see <include/linux/dma-contiguous.h>.
  221. If unsure, say "n".
  222. if DMA_CMA
  223. comment "Default contiguous memory area size:"
  224. config CMA_SIZE_MBYTES
  225. int "Size in Mega Bytes"
  226. depends on !CMA_SIZE_SEL_PERCENTAGE
  227. default 0 if X86
  228. default 16
  229. help
  230. Defines the size (in MiB) of the default memory area for Contiguous
  231. Memory Allocator. If the size of 0 is selected, CMA is disabled by
  232. default, but it can be enabled by passing cma=size[MG] to the kernel.
  233. config CMA_SIZE_PERCENTAGE
  234. int "Percentage of total memory"
  235. depends on !CMA_SIZE_SEL_MBYTES
  236. default 0 if X86
  237. default 10
  238. help
  239. Defines the size of the default memory area for Contiguous Memory
  240. Allocator as a percentage of the total memory in the system.
  241. If 0 percent is selected, CMA is disabled by default, but it can be
  242. enabled by passing cma=size[MG] to the kernel.
  243. choice
  244. prompt "Selected region size"
  245. default CMA_SIZE_SEL_MBYTES
  246. config CMA_SIZE_SEL_MBYTES
  247. bool "Use mega bytes value only"
  248. config CMA_SIZE_SEL_PERCENTAGE
  249. bool "Use percentage value only"
  250. config CMA_SIZE_SEL_MIN
  251. bool "Use lower value (minimum)"
  252. config CMA_SIZE_SEL_MAX
  253. bool "Use higher value (maximum)"
  254. endchoice
  255. config CMA_ALIGNMENT
  256. int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
  257. range 4 12
  258. default 8
  259. help
  260. DMA mapping framework by default aligns all buffers to the smallest
  261. PAGE_SIZE order which is greater than or equal to the requested buffer
  262. size. This works well for buffers up to a few hundreds kilobytes, but
  263. for larger buffers it just a memory waste. With this parameter you can
  264. specify the maximum PAGE_SIZE order for contiguous buffers. Larger
  265. buffers will be aligned only to this specified order. The order is
  266. expressed as a power of two multiplied by the PAGE_SIZE.
  267. For example, if your system defaults to 4KiB pages, the order value
  268. of 8 means that the buffers will be aligned up to 1MiB only.
  269. If unsure, leave the default value "8".
  270. endif
  271. config GENERIC_ARCH_TOPOLOGY
  272. bool
  273. help
  274. Enable support for architectures common topology code: e.g., parsing
  275. CPU capacity information from DT, usage of such information for
  276. appropriate scaling, sysfs interface for changing capacity values at
  277. runtime.
  278. endmenu