Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0-only
2menu "CPU Frequency scaling"
3
4config CPU_FREQ
5 bool "CPU Frequency scaling"
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
11 Note that this driver doesn't automatically change the CPU
12 clock speed, you need to either enable a dynamic cpufreq governor
13 (see below) after boot, or use a userspace tool.
14
15 For details, take a look at
16 <file:Documentation/admin-guide/pm/cpufreq.rst>.
17
18 If in doubt, say N.
19
20if CPU_FREQ
21
22config CPU_FREQ_GOV_ATTR_SET
23 bool
24
25config CPU_FREQ_GOV_COMMON
26 select CPU_FREQ_GOV_ATTR_SET
27 select IRQ_WORK
28 bool
29
30config 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.
36
37choice
38 prompt "Default CPUFreq governor"
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
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
47config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
48 bool "performance"
49 select CPU_FREQ_GOV_PERFORMANCE
50 help
51 Use the CPUFreq governor 'performance' as default. This sets
52 the frequency statically to the highest frequency supported by
53 the CPU.
54
55config CPU_FREQ_DEFAULT_GOV_POWERSAVE
56 bool "powersave"
57 select CPU_FREQ_GOV_POWERSAVE
58 help
59 Use the CPUFreq governor 'powersave' as default. This sets
60 the frequency statically to the lowest frequency supported by
61 the CPU.
62
63config CPU_FREQ_DEFAULT_GOV_USERSPACE
64 bool "userspace"
65 select CPU_FREQ_GOV_USERSPACE
66 help
67 Use the CPUFreq governor 'userspace' as default. This allows
68 you to set the CPU frequency manually or when a userspace
69 program shall be able to set the CPU dynamically without having
70 to enable the userspace governor manually.
71
72config CPU_FREQ_DEFAULT_GOV_ONDEMAND
73 bool "ondemand"
74 depends on !(X86_INTEL_PSTATE && SMP)
75 select CPU_FREQ_GOV_ONDEMAND
76 select CPU_FREQ_GOV_PERFORMANCE
77 help
78 Use the CPUFreq governor 'ondemand' as default. This allows
79 you to get a full dynamic frequency capable system by simply
80 loading your cpufreq low-level hardware driver.
81 Be aware that not all cpufreq drivers support the ondemand
82 governor. If unsure have a look at the help section of the
83 driver. Fallback governor will be the performance governor.
84
85config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
86 bool "conservative"
87 depends on !(X86_INTEL_PSTATE && SMP)
88 select CPU_FREQ_GOV_CONSERVATIVE
89 select CPU_FREQ_GOV_PERFORMANCE
90 help
91 Use the CPUFreq governor 'conservative' as default. This allows
92 you to get a full dynamic frequency capable system by simply
93 loading your cpufreq low-level hardware driver.
94 Be aware that not all cpufreq drivers support the conservative
95 governor. If unsure have a look at the help section of the
96 driver. Fallback governor will be the performance governor.
97
98config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
99 bool "schedutil"
100 depends on SMP
101 select CPU_FREQ_GOV_SCHEDUTIL
102 select CPU_FREQ_GOV_PERFORMANCE
103 help
104 Use the 'schedutil' CPUFreq governor by default. If unsure,
105 have a look at the help section of that governor. The fallback
106 governor will be 'performance'.
107
108endchoice
109
110config CPU_FREQ_GOV_PERFORMANCE
111 tristate "'performance' governor"
112 help
113 This cpufreq governor sets the frequency statically to the
114 highest available CPU frequency.
115
116 To compile this driver as a module, choose M here: the
117 module will be called cpufreq_performance.
118
119 If in doubt, say Y.
120
121config CPU_FREQ_GOV_POWERSAVE
122 tristate "'powersave' governor"
123 help
124 This cpufreq governor sets the frequency statically to the
125 lowest available CPU frequency.
126
127 To compile this driver as a module, choose M here: the
128 module will be called cpufreq_powersave.
129
130 If in doubt, say Y.
131
132config CPU_FREQ_GOV_USERSPACE
133 tristate "'userspace' governor for userspace frequency scaling"
134 help
135 Enable this cpufreq governor when you either want to set the
136 CPU frequency manually or when a userspace program shall
137 be able to set the CPU dynamically, like on LART
138 <http://www.lartmaker.nl/>.
139
140 To compile this driver as a module, choose M here: the
141 module will be called cpufreq_userspace.
142
143 If in doubt, say Y.
144
145config CPU_FREQ_GOV_ONDEMAND
146 tristate "'ondemand' cpufreq policy governor"
147 select CPU_FREQ_GOV_COMMON
148 help
149 'ondemand' - This driver adds a dynamic cpufreq policy governor.
150 The governor does a periodic polling and
151 changes frequency based on the CPU utilization.
152 The support for this governor depends on CPU capability to
153 do fast frequency switching (i.e, very low latency frequency
154 transitions).
155
156 To compile this driver as a module, choose M here: the
157 module will be called cpufreq_ondemand.
158
159 For details, take a look at
160 <file:Documentation/admin-guide/pm/cpufreq.rst>.
161
162 If in doubt, say N.
163
164config CPU_FREQ_GOV_CONSERVATIVE
165 tristate "'conservative' cpufreq governor"
166 select CPU_FREQ_GOV_COMMON
167 help
168 'conservative' - this driver is rather similar to the 'ondemand'
169 governor both in its source code and its purpose, the difference is
170 its optimisation for better suitability in a battery powered
171 environment. The frequency is gracefully increased and decreased
172 rather than jumping to 100% when speed is required.
173
174 If you have a desktop machine then you should really be considering
175 the 'ondemand' governor instead, however if you are using a laptop,
176 PDA or even an AMD64 based computer (due to the unacceptable
177 step-by-step latency issues between the minimum and maximum frequency
178 transitions in the CPU) you will probably want to use this governor.
179
180 To compile this driver as a module, choose M here: the
181 module will be called cpufreq_conservative.
182
183 For details, take a look at
184 <file:Documentation/admin-guide/pm/cpufreq.rst>.
185
186 If in doubt, say N.
187
188config CPU_FREQ_GOV_SCHEDUTIL
189 bool "'schedutil' cpufreq policy governor"
190 depends on SMP
191 select CPU_FREQ_GOV_ATTR_SET
192 select IRQ_WORK
193 help
194 This governor makes decisions based on the utilization data provided
195 by the scheduler. It sets the CPU frequency to be proportional to
196 the utilization/capacity ratio coming from the scheduler. If the
197 utilization is frequency-invariant, the new frequency is also
198 proportional to the maximum available frequency. If that is not the
199 case, it is proportional to the current frequency of the CPU. The
200 frequency tipping point is at utilization/capacity equal to 80% in
201 both cases.
202
203 If in doubt, say N.
204
205comment "CPU frequency scaling drivers"
206
207config CPUFREQ_DT
208 tristate "Generic DT based cpufreq driver"
209 depends on HAVE_CLK && OF
210 select CPUFREQ_DT_PLATDEV
211 select PM_OPP
212 help
213 This adds a generic DT based cpufreq driver for frequency management.
214 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
215 systems.
216
217 If in doubt, say N.
218
219config CPUFREQ_DT_RUST
220 tristate "Rust based Generic DT based cpufreq driver"
221 depends on HAVE_CLK && OF && RUST
222 select CPUFREQ_DT_PLATDEV
223 select PM_OPP
224 help
225 This adds a Rust based generic DT based cpufreq driver for frequency
226 management. It supports both uniprocessor (UP) and symmetric
227 multiprocessor (SMP) systems.
228
229 If in doubt, say N.
230
231config CPUFREQ_VIRT
232 tristate "Virtual cpufreq driver"
233 depends on GENERIC_ARCH_TOPOLOGY
234 help
235 This adds a virtualized cpufreq driver for guest kernels that
236 read/writes to a MMIO region for a virtualized cpufreq device to
237 communicate with the host. It sends performance requests to the host
238 which gets used as a hint to schedule vCPU threads and select CPU
239 frequency. If a VM does not support a virtualized FIE such as AMUs,
240 it updates the frequency scaling factor by polling host CPU frequency
241 to enable accurate Per-Entity Load Tracking for tasks running in the guest.
242
243 If in doubt, say N.
244
245config CPUFREQ_DT_PLATDEV
246 bool "Generic DT based cpufreq platdev driver"
247 depends on OF
248 help
249 This adds a generic DT based cpufreq platdev driver for frequency
250 management. This creates a 'cpufreq-dt' platform device, on the
251 supported platforms.
252
253 If in doubt, say N.
254
255if X86
256source "drivers/cpufreq/Kconfig.x86"
257endif
258
259source "drivers/cpufreq/Kconfig.arm"
260
261if PPC32 || PPC64
262source "drivers/cpufreq/Kconfig.powerpc"
263endif
264
265if MIPS
266config BMIPS_CPUFREQ
267 tristate "BMIPS CPUfreq Driver"
268 help
269 This option adds a CPUfreq driver for BMIPS processors with
270 support for configurable CPU frequency.
271
272 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
273
274 If in doubt, say N.
275
276config LOONGSON2_CPUFREQ
277 tristate "Loongson2 CPUFreq Driver"
278 depends on LEMOTE_MACH2F
279 help
280 This option adds a CPUFreq driver for loongson processors which
281 support software configurable cpu frequency.
282
283 Loongson2F and its successors support this feature.
284
285 If in doubt, say N.
286endif
287
288if LOONGARCH
289config LOONGSON3_CPUFREQ
290 tristate "Loongson3 CPUFreq Driver"
291 help
292 This option adds a CPUFreq driver for Loongson processors which
293 support software configurable cpu frequency.
294
295 Loongson-3 family processors support this feature.
296
297 If in doubt, say N.
298endif
299
300if SPARC64
301config SPARC_US3_CPUFREQ
302 tristate "UltraSPARC-III CPU Frequency driver"
303 help
304 This adds the CPUFreq driver for UltraSPARC-III processors.
305
306 If in doubt, say N.
307
308config SPARC_US2E_CPUFREQ
309 tristate "UltraSPARC-IIe CPU Frequency driver"
310 help
311 This adds the CPUFreq driver for UltraSPARC-IIe processors.
312
313 If in doubt, say N.
314endif
315
316if SUPERH
317config SH_CPU_FREQ
318 tristate "SuperH CPU Frequency driver"
319 help
320 This adds the cpufreq driver for SuperH. Any CPU that supports
321 clock rate rounding through the clock framework can use this
322 driver. While it will make the kernel slightly larger, this is
323 harmless for CPUs that don't support rate rounding. The driver
324 will also generate a notice in the boot log before disabling
325 itself if the CPU in question is not capable of rate rounding.
326
327 If unsure, say N.
328endif
329
330config QORIQ_CPUFREQ
331 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
332 depends on OF && COMMON_CLK
333 depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
334 select CLK_QORIQ
335 help
336 This adds the CPUFreq driver support for Freescale QorIQ SoCs
337 which are capable of changing the CPU's frequency dynamically.
338
339config ACPI_CPPC_CPUFREQ
340 tristate "CPUFreq driver based on the ACPI CPPC spec"
341 depends on ACPI_PROCESSOR
342 depends on ARM || ARM64 || RISCV
343 select ACPI_CPPC_LIB
344 help
345 This adds a CPUFreq driver which uses CPPC methods
346 as described in the ACPIv5.1 spec. CPPC stands for
347 Collaborative Processor Performance Controls. It
348 is based on an abstract continuous scale of CPU
349 performance values which allows the remote power
350 processor to flexibly optimize for power and
351 performance. CPPC relies on power management firmware
352 support for its operation.
353
354 If in doubt, say N.
355
356config ACPI_CPPC_CPUFREQ_FIE
357 bool "Frequency Invariance support for CPPC cpufreq driver"
358 depends on ACPI_CPPC_CPUFREQ && GENERIC_ARCH_TOPOLOGY
359 depends on ARM || ARM64 || RISCV
360 default y
361 help
362 This extends frequency invariance support in the CPPC cpufreq driver,
363 by using CPPC delivered and reference performance counters.
364
365 If in doubt, say N.
366
367endif # CPU_FREQ
368
369endmenu