Kconfig 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "CPU Frequency scaling"
  3. config CPU_FREQ
  4. bool "CPU Frequency scaling"
  5. select SRCU
  6. help
  7. CPU Frequency scaling allows you to change the clock speed of
  8. CPUs on the fly. This is a nice method to save power, because
  9. the lower the CPU clock speed, the less power the CPU consumes.
  10. Note that this driver doesn't automatically change the CPU
  11. clock speed, you need to either enable a dynamic cpufreq governor
  12. (see below) after boot, or use a userspace tool.
  13. For details, take a look at
  14. <file:Documentation/admin-guide/pm/cpufreq.rst>.
  15. If in doubt, say N.
  16. if CPU_FREQ
  17. config CPU_FREQ_GOV_ATTR_SET
  18. bool
  19. config CPU_FREQ_GOV_COMMON
  20. select CPU_FREQ_GOV_ATTR_SET
  21. select IRQ_WORK
  22. bool
  23. config CPU_FREQ_STAT
  24. bool "CPU frequency transition statistics"
  25. help
  26. Export CPU frequency statistics information through sysfs.
  27. If in doubt, say N.
  28. config CPU_FREQ_TIMES
  29. bool "CPU frequency time-in-state statistics"
  30. help
  31. Export CPU time-in-state information through procfs.
  32. If in doubt, say N.
  33. config CPU_FREQ_LIMIT
  34. tristate "CPU frequency limit API"
  35. help
  36. This driver supports API to limit CPU frequency.
  37. choice
  38. prompt "Default CPUFreq governor"
  39. default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
  40. default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
  41. default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
  42. default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
  43. help
  44. This option sets which CPUFreq governor shall be loaded at
  45. startup. If in doubt, use the default setting.
  46. config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
  47. bool "performance"
  48. select CPU_FREQ_GOV_PERFORMANCE
  49. help
  50. Use the CPUFreq governor 'performance' as default. This sets
  51. the frequency statically to the highest frequency supported by
  52. the CPU.
  53. config CPU_FREQ_DEFAULT_GOV_POWERSAVE
  54. bool "powersave"
  55. select CPU_FREQ_GOV_POWERSAVE
  56. help
  57. Use the CPUFreq governor 'powersave' as default. This sets
  58. the frequency statically to the lowest frequency supported by
  59. the CPU.
  60. config CPU_FREQ_DEFAULT_GOV_USERSPACE
  61. bool "userspace"
  62. select CPU_FREQ_GOV_USERSPACE
  63. help
  64. Use the CPUFreq governor 'userspace' as default. This allows
  65. you to set the CPU frequency manually or when a userspace
  66. program shall be able to set the CPU dynamically without having
  67. to enable the userspace governor manually.
  68. config CPU_FREQ_DEFAULT_GOV_ONDEMAND
  69. bool "ondemand"
  70. depends on !(X86_INTEL_PSTATE && SMP)
  71. select CPU_FREQ_GOV_ONDEMAND
  72. select CPU_FREQ_GOV_PERFORMANCE
  73. help
  74. Use the CPUFreq governor 'ondemand' as default. This allows
  75. you to get a full dynamic frequency capable system by simply
  76. loading your cpufreq low-level hardware driver.
  77. Be aware that not all cpufreq drivers support the ondemand
  78. governor. If unsure have a look at the help section of the
  79. driver. Fallback governor will be the performance governor.
  80. config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
  81. bool "conservative"
  82. depends on !(X86_INTEL_PSTATE && SMP)
  83. select CPU_FREQ_GOV_CONSERVATIVE
  84. select CPU_FREQ_GOV_PERFORMANCE
  85. help
  86. Use the CPUFreq governor 'conservative' as default. This allows
  87. you to get a full dynamic frequency capable system by simply
  88. loading your cpufreq low-level hardware driver.
  89. Be aware that not all cpufreq drivers support the conservative
  90. governor. If unsure have a look at the help section of the
  91. driver. Fallback governor will be the performance governor.
  92. config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
  93. bool "schedutil"
  94. depends on SMP
  95. select CPU_FREQ_GOV_SCHEDUTIL
  96. select CPU_FREQ_GOV_PERFORMANCE
  97. help
  98. Use the 'schedutil' CPUFreq governor by default. If unsure,
  99. have a look at the help section of that governor. The fallback
  100. governor will be 'performance'.
  101. endchoice
  102. config CPU_FREQ_GOV_PERFORMANCE
  103. tristate "'performance' governor"
  104. help
  105. This cpufreq governor sets the frequency statically to the
  106. highest available CPU frequency.
  107. To compile this driver as a module, choose M here: the
  108. module will be called cpufreq_performance.
  109. If in doubt, say Y.
  110. config CPU_FREQ_GOV_POWERSAVE
  111. tristate "'powersave' governor"
  112. help
  113. This cpufreq governor sets the frequency statically to the
  114. lowest available CPU frequency.
  115. To compile this driver as a module, choose M here: the
  116. module will be called cpufreq_powersave.
  117. If in doubt, say Y.
  118. config CPU_FREQ_GOV_USERSPACE
  119. tristate "'userspace' governor for userspace frequency scaling"
  120. help
  121. Enable this cpufreq governor when you either want to set the
  122. CPU frequency manually or when a userspace program shall
  123. be able to set the CPU dynamically, like on LART
  124. <http://www.lartmaker.nl/>.
  125. To compile this driver as a module, choose M here: the
  126. module will be called cpufreq_userspace.
  127. If in doubt, say Y.
  128. config CPU_FREQ_GOV_ONDEMAND
  129. tristate "'ondemand' cpufreq policy governor"
  130. select CPU_FREQ_GOV_COMMON
  131. help
  132. 'ondemand' - This driver adds a dynamic cpufreq policy governor.
  133. The governor does a periodic polling and
  134. changes frequency based on the CPU utilization.
  135. The support for this governor depends on CPU capability to
  136. do fast frequency switching (i.e, very low latency frequency
  137. transitions).
  138. To compile this driver as a module, choose M here: the
  139. module will be called cpufreq_ondemand.
  140. For details, take a look at
  141. <file:Documentation/admin-guide/pm/cpufreq.rst>.
  142. If in doubt, say N.
  143. config CPU_FREQ_GOV_CONSERVATIVE
  144. tristate "'conservative' cpufreq governor"
  145. depends on CPU_FREQ
  146. select CPU_FREQ_GOV_COMMON
  147. help
  148. 'conservative' - this driver is rather similar to the 'ondemand'
  149. governor both in its source code and its purpose, the difference is
  150. its optimisation for better suitability in a battery powered
  151. environment. The frequency is gracefully increased and decreased
  152. rather than jumping to 100% when speed is required.
  153. If you have a desktop machine then you should really be considering
  154. the 'ondemand' governor instead, however if you are using a laptop,
  155. PDA or even an AMD64 based computer (due to the unacceptable
  156. step-by-step latency issues between the minimum and maximum frequency
  157. transitions in the CPU) you will probably want to use this governor.
  158. To compile this driver as a module, choose M here: the
  159. module will be called cpufreq_conservative.
  160. For details, take a look at
  161. <file:Documentation/admin-guide/pm/cpufreq.rst>.
  162. If in doubt, say N.
  163. config CPU_FREQ_GOV_SCHEDUTIL
  164. bool "'schedutil' cpufreq policy governor"
  165. depends on CPU_FREQ && SMP
  166. select CPU_FREQ_GOV_ATTR_SET
  167. select IRQ_WORK
  168. help
  169. This governor makes decisions based on the utilization data provided
  170. by the scheduler. It sets the CPU frequency to be proportional to
  171. the utilization/capacity ratio coming from the scheduler. If the
  172. utilization is frequency-invariant, the new frequency is also
  173. proportional to the maximum available frequency. If that is not the
  174. case, it is proportional to the current frequency of the CPU. The
  175. frequency tipping point is at utilization/capacity equal to 80% in
  176. both cases.
  177. If in doubt, say N.
  178. comment "CPU frequency scaling drivers"
  179. config CPUFREQ_DT
  180. tristate "Generic DT based cpufreq driver"
  181. depends on HAVE_CLK && OF
  182. select CPUFREQ_DT_PLATDEV
  183. select PM_OPP
  184. help
  185. This adds a generic DT based cpufreq driver for frequency management.
  186. It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
  187. systems.
  188. If in doubt, say N.
  189. config CPUFREQ_DT_PLATDEV
  190. bool
  191. help
  192. This adds a generic DT based cpufreq platdev driver for frequency
  193. management. This creates a 'cpufreq-dt' platform device, on the
  194. supported platforms.
  195. If in doubt, say N.
  196. config CPUFREQ_DUMMY
  197. tristate "Dummy CPU frequency driver"
  198. help
  199. This option adds a generic dummy CPUfreq driver, which sets a fake
  200. 2-frequency table when initializing each policy and otherwise does
  201. nothing.
  202. If in doubt, say N
  203. if X86
  204. source "drivers/cpufreq/Kconfig.x86"
  205. endif
  206. if ARM || ARM64
  207. source "drivers/cpufreq/Kconfig.arm"
  208. endif
  209. if PPC32 || PPC64
  210. source "drivers/cpufreq/Kconfig.powerpc"
  211. endif
  212. if IA64
  213. config IA64_ACPI_CPUFREQ
  214. tristate "ACPI Processor P-States driver"
  215. depends on ACPI_PROCESSOR
  216. help
  217. This driver adds a CPUFreq driver which utilizes the ACPI
  218. Processor Performance States.
  219. If in doubt, say N.
  220. endif
  221. if MIPS
  222. config BMIPS_CPUFREQ
  223. tristate "BMIPS CPUfreq Driver"
  224. help
  225. This option adds a CPUfreq driver for BMIPS processors with
  226. support for configurable CPU frequency.
  227. For now, BMIPS5 chips are supported (such as the Broadcom 7425).
  228. If in doubt, say N.
  229. config LOONGSON2_CPUFREQ
  230. tristate "Loongson2 CPUFreq Driver"
  231. depends on LEMOTE_MACH2F
  232. help
  233. This option adds a CPUFreq driver for loongson processors which
  234. support software configurable cpu frequency.
  235. Loongson2F and its successors support this feature.
  236. If in doubt, say N.
  237. config LOONGSON1_CPUFREQ
  238. tristate "Loongson1 CPUFreq Driver"
  239. depends on LOONGSON1_LS1B
  240. help
  241. This option adds a CPUFreq driver for loongson1 processors which
  242. support software configurable cpu frequency.
  243. If in doubt, say N.
  244. endif
  245. if SPARC64
  246. config SPARC_US3_CPUFREQ
  247. tristate "UltraSPARC-III CPU Frequency driver"
  248. help
  249. This adds the CPUFreq driver for UltraSPARC-III processors.
  250. If in doubt, say N.
  251. config SPARC_US2E_CPUFREQ
  252. tristate "UltraSPARC-IIe CPU Frequency driver"
  253. help
  254. This adds the CPUFreq driver for UltraSPARC-IIe processors.
  255. If in doubt, say N.
  256. endif
  257. if SUPERH
  258. config SH_CPU_FREQ
  259. tristate "SuperH CPU Frequency driver"
  260. help
  261. This adds the cpufreq driver for SuperH. Any CPU that supports
  262. clock rate rounding through the clock framework can use this
  263. driver. While it will make the kernel slightly larger, this is
  264. harmless for CPUs that don't support rate rounding. The driver
  265. will also generate a notice in the boot log before disabling
  266. itself if the CPU in question is not capable of rate rounding.
  267. If unsure, say N.
  268. endif
  269. config QORIQ_CPUFREQ
  270. tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
  271. depends on OF && COMMON_CLK
  272. depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
  273. select CLK_QORIQ
  274. help
  275. This adds the CPUFreq driver support for Freescale QorIQ SoCs
  276. which are capable of changing the CPU's frequency dynamically.
  277. config QCOM_LMH_STAT
  278. bool
  279. default y
  280. help
  281. time tracking QCOM LMH clocks
  282. endif
  283. endmenu