Kconfig 10 KB

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