Kconfig 10.2 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0-only
2 3
menu "CPU Frequency scaling"

Linus Torvalds's avatar
Linus Torvalds committed
4 5 6 7 8 9 10 11 12 13 14
config CPU_FREQ
	bool "CPU Frequency scaling"
	help
	  CPU Frequency scaling allows you to change the clock speed of 
	  CPUs on the fly. This is a nice method to save power, because 
	  the lower the CPU clock speed, the less power the CPU consumes.

	  Note that this driver doesn't automatically change the CPU
	  clock speed, you need to either enable a dynamic cpufreq governor
	  (see below) after boot, or use a userspace tool.

15 16
	  For details, take a look at
	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
Linus Torvalds's avatar
Linus Torvalds committed
17 18 19 20 21

	  If in doubt, say N.

if CPU_FREQ

22 23 24
config CPU_FREQ_GOV_ATTR_SET
	bool

25
config CPU_FREQ_GOV_COMMON
26
	select CPU_FREQ_GOV_ATTR_SET
27
	select IRQ_WORK
28 29
	bool

Linus Torvalds's avatar
Linus Torvalds committed
30
config CPU_FREQ_STAT
31
	bool "CPU frequency transition statistics"
32
	help
33
	  Export CPU frequency statistics information through sysfs.
34 35

	  If in doubt, say N.
Linus Torvalds's avatar
Linus Torvalds committed
36 37 38

choice
	prompt "Default CPUFreq governor"
Arnd Bergmann's avatar
Arnd Bergmann committed
39
	default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1110_CPUFREQ
40
	default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
41
	default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_PSTATE) && SMP
Linus Torvalds's avatar
Linus Torvalds committed
42 43 44
	default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
	help
	  This option sets which CPUFreq governor shall be loaded at
45
	  startup. If in doubt, use the default setting.
Linus Torvalds's avatar
Linus Torvalds committed
46 47 48 49 50 51 52 53 54

config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
	bool "performance"
	select CPU_FREQ_GOV_PERFORMANCE
	help
	  Use the CPUFreq governor 'performance' as default. This sets
	  the frequency statically to the highest frequency supported by
	  the CPU.

55 56 57 58 59 60 61 62
config CPU_FREQ_DEFAULT_GOV_POWERSAVE
	bool "powersave"
	select CPU_FREQ_GOV_POWERSAVE
	help
	  Use the CPUFreq governor 'powersave' as default. This sets
	  the frequency statically to the lowest frequency supported by
	  the CPU.

Linus Torvalds's avatar
Linus Torvalds committed
63 64 65 66 67
config CPU_FREQ_DEFAULT_GOV_USERSPACE
	bool "userspace"
	select CPU_FREQ_GOV_USERSPACE
	help
	  Use the CPUFreq governor 'userspace' as default. This allows
68
	  you to set the CPU frequency manually or when a userspace 
Linus Torvalds's avatar
Linus Torvalds committed
69 70 71
	  program shall be able to set the CPU dynamically without having
	  to enable the userspace governor manually.

72 73
config CPU_FREQ_DEFAULT_GOV_ONDEMAND
	bool "ondemand"
74
	depends on !(X86_INTEL_PSTATE && SMP)
75 76 77 78 79 80 81 82 83 84 85 86
	select CPU_FREQ_GOV_ONDEMAND
	select CPU_FREQ_GOV_PERFORMANCE
	help
	  Use the CPUFreq governor 'ondemand' as default. This allows
	  you to get a full dynamic frequency capable system by simply
	  loading your cpufreq low-level hardware driver.
	  Be aware that not all cpufreq drivers support the ondemand
	  governor. If unsure have a look at the help section of the
	  driver. Fallback governor will be the performance governor.

config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
	bool "conservative"
87
	depends on !(X86_INTEL_PSTATE && SMP)
88 89 90 91 92 93 94 95 96
	select CPU_FREQ_GOV_CONSERVATIVE
	select CPU_FREQ_GOV_PERFORMANCE
	help
	  Use the CPUFreq governor 'conservative' as default. This allows
	  you to get a full dynamic frequency capable system by simply
	  loading your cpufreq low-level hardware driver.
	  Be aware that not all cpufreq drivers support the conservative
	  governor. If unsure have a look at the help section of the
	  driver. Fallback governor will be the performance governor.
97 98 99

config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
	bool "schedutil"
100
	depends on SMP
101 102 103 104 105 106 107
	select CPU_FREQ_GOV_SCHEDUTIL
	select CPU_FREQ_GOV_PERFORMANCE
	help
	  Use the 'schedutil' CPUFreq governor by default. If unsure,
	  have a look at the help section of that governor. The fallback
	  governor will be 'performance'.

Linus Torvalds's avatar
Linus Torvalds committed
108 109 110
endchoice

config CPU_FREQ_GOV_PERFORMANCE
111 112
	tristate "'performance' governor"
	help
Linus Torvalds's avatar
Linus Torvalds committed
113 114 115
	  This cpufreq governor sets the frequency statically to the
	  highest available CPU frequency.

116 117 118
	  To compile this driver as a module, choose M here: the
	  module will be called cpufreq_performance.

Linus Torvalds's avatar
Linus Torvalds committed
119 120 121
	  If in doubt, say Y.

config CPU_FREQ_GOV_POWERSAVE
122 123
	tristate "'powersave' governor"
	help
Linus Torvalds's avatar
Linus Torvalds committed
124 125 126
	  This cpufreq governor sets the frequency statically to the
	  lowest available CPU frequency.

127 128 129
	  To compile this driver as a module, choose M here: the
	  module will be called cpufreq_powersave.

Linus Torvalds's avatar
Linus Torvalds committed
130 131 132
	  If in doubt, say Y.

config CPU_FREQ_GOV_USERSPACE
133 134
	tristate "'userspace' governor for userspace frequency scaling"
	help
Linus Torvalds's avatar
Linus Torvalds committed
135
	  Enable this cpufreq governor when you either want to set the
136
	  CPU frequency manually or when a userspace program shall
Linus Torvalds's avatar
Linus Torvalds committed
137
	  be able to set the CPU dynamically, like on LART 
Erik Mouw's avatar
Erik Mouw committed
138
	  <http://www.lartmaker.nl/>.
Linus Torvalds's avatar
Linus Torvalds committed
139

140 141 142
	  To compile this driver as a module, choose M here: the
	  module will be called cpufreq_userspace.

Linus Torvalds's avatar
Linus Torvalds committed
143 144 145 146
	  If in doubt, say Y.

config CPU_FREQ_GOV_ONDEMAND
	tristate "'ondemand' cpufreq policy governor"
147
	select CPU_FREQ_GOV_COMMON
Linus Torvalds's avatar
Linus Torvalds committed
148 149 150 151 152 153 154 155
	help
	  'ondemand' - This driver adds a dynamic cpufreq policy governor.
	  The governor does a periodic polling and 
	  changes frequency based on the CPU utilization.
	  The support for this governor depends on CPU capability to
	  do fast frequency switching (i.e, very low latency frequency
	  transitions). 

156 157 158
	  To compile this driver as a module, choose M here: the
	  module will be called cpufreq_ondemand.

159 160
	  For details, take a look at
	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
Linus Torvalds's avatar
Linus Torvalds committed
161 162 163

	  If in doubt, say N.

164 165 166
config CPU_FREQ_GOV_CONSERVATIVE
	tristate "'conservative' cpufreq governor"
	depends on CPU_FREQ
167
	select CPU_FREQ_GOV_COMMON
168 169 170 171 172 173 174 175 176 177 178 179 180
	help
	  'conservative' - this driver is rather similar to the 'ondemand'
	  governor both in its source code and its purpose, the difference is
	  its optimisation for better suitability in a battery powered
	  environment.  The frequency is gracefully increased and decreased
	  rather than jumping to 100% when speed is required.

	  If you have a desktop machine then you should really be considering
	  the 'ondemand' governor instead, however if you are using a laptop,
	  PDA or even an AMD64 based computer (due to the unacceptable
	  step-by-step latency issues between the minimum and maximum frequency
	  transitions in the CPU) you will probably want to use this governor.

181 182 183
	  To compile this driver as a module, choose M here: the
	  module will be called cpufreq_conservative.

184 185
	  For details, take a look at
	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
186 187 188

	  If in doubt, say N.

189
config CPU_FREQ_GOV_SCHEDUTIL
190
	bool "'schedutil' cpufreq policy governor"
191
	depends on CPU_FREQ && SMP
192 193 194 195 196 197 198 199 200 201 202 203 204 205
	select CPU_FREQ_GOV_ATTR_SET
	select IRQ_WORK
	help
	  This governor makes decisions based on the utilization data provided
	  by the scheduler.  It sets the CPU frequency to be proportional to
	  the utilization/capacity ratio coming from the scheduler.  If the
	  utilization is frequency-invariant, the new frequency is also
	  proportional to the maximum available frequency.  If that is not the
	  case, it is proportional to the current frequency of the CPU.  The
	  frequency tipping point is at utilization/capacity equal to 80% in
	  both cases.

	  If in doubt, say N.

206 207
comment "CPU frequency scaling drivers"

208 209
config CPUFREQ_DT
	tristate "Generic DT based cpufreq driver"
210
	depends on HAVE_CLK && OF
211
	select CPUFREQ_DT_PLATDEV
212
	select PM_OPP
213
	help
214
	  This adds a generic DT based cpufreq driver for frequency management.
215
	  It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
216
	  systems.
217 218 219

	  If in doubt, say N.

220
config CPUFREQ_DT_PLATDEV
221
	tristate "Generic DT based cpufreq platdev driver"
222
	depends on OF
223 224 225 226 227 228 229
	help
	  This adds a generic DT based cpufreq platdev driver for frequency
	  management.  This creates a 'cpufreq-dt' platform device, on the
	  supported platforms.

	  If in doubt, say N.

230
if X86
231
source "drivers/cpufreq/Kconfig.x86"
232
endif
233

234
if ARM || ARM64
235
source "drivers/cpufreq/Kconfig.arm"
236
endif
237

238 239 240
if PPC32 || PPC64
source "drivers/cpufreq/Kconfig.powerpc"
endif
241

242
if MIPS
243 244 245 246 247 248 249 250 251 252
config BMIPS_CPUFREQ
	tristate "BMIPS CPUfreq Driver"
	help
	  This option adds a CPUfreq driver for BMIPS processors with
	  support for configurable CPU frequency.

	  For now, BMIPS5 chips are supported (such as the Broadcom 7425).

	  If in doubt, say N.

253 254
config LOONGSON2_CPUFREQ
	tristate "Loongson2 CPUFreq Driver"
255
	depends on LEMOTE_MACH2F
256 257 258 259
	help
	  This option adds a CPUFreq driver for loongson processors which
	  support software configurable cpu frequency.

260
	  Loongson2F and its successors support this feature.
261

262
	  If in doubt, say N.
263
endif
264

265
if SPARC64
266 267 268 269 270 271 272 273 274 275 276 277 278
config SPARC_US3_CPUFREQ
	tristate "UltraSPARC-III CPU Frequency driver"
	help
	  This adds the CPUFreq driver for UltraSPARC-III processors.

	  If in doubt, say N.

config SPARC_US2E_CPUFREQ
	tristate "UltraSPARC-IIe CPU Frequency driver"
	help
	  This adds the CPUFreq driver for UltraSPARC-IIe processors.

	  If in doubt, say N.
279
endif
280

281
if SUPERH
282 283 284 285 286 287 288 289 290 291 292
config SH_CPU_FREQ
	tristate "SuperH CPU Frequency driver"
	help
	  This adds the cpufreq driver for SuperH. Any CPU that supports
	  clock rate rounding through the clock framework can use this
	  driver. While it will make the kernel slightly larger, this is
	  harmless for CPUs that don't support rate rounding. The driver
	  will also generate a notice in the boot log before disabling
	  itself if the CPU in question is not capable of rate rounding.

	  If unsure, say N.
293
endif
294

295 296
config QORIQ_CPUFREQ
	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
297 298
	depends on OF && COMMON_CLK
	depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
299 300 301 302 303
	select CLK_QORIQ
	help
	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
	  which are capable of changing the CPU's frequency dynamically.

304
endif
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333

config ACPI_CPPC_CPUFREQ
	tristate "CPUFreq driver based on the ACPI CPPC spec"
	depends on ACPI_PROCESSOR
	depends on ARM || ARM64 || RISCV
	select ACPI_CPPC_LIB
	help
	  This adds a CPUFreq driver which uses CPPC methods
	  as described in the ACPIv5.1 spec. CPPC stands for
	  Collaborative Processor Performance Controls. It
	  is based on an abstract continuous scale of CPU
	  performance values which allows the remote power
	  processor to flexibly optimize for power and
	  performance. CPPC relies on power management firmware
	  support for its operation.

	  If in doubt, say N.

config ACPI_CPPC_CPUFREQ_FIE
	bool "Frequency Invariance support for CPPC cpufreq driver"
	depends on ACPI_CPPC_CPUFREQ && GENERIC_ARCH_TOPOLOGY
	depends on ARM || ARM64 || RISCV
	default y
	help
	  This extends frequency invariance support in the CPPC cpufreq driver,
	  by using CPPC delivered and reference performance counters.

	  If in doubt, say N.

334
endmenu