blob: b374515f98138f4db3c6e87a15433790645366b9 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001menu "CPU Frequency scaling"
2
3config 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
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 <file:Documentation/cpu-freq>.
16
17 If in doubt, say N.
18
19if CPU_FREQ
20
21config CPU_FREQ_GOV_ATTR_SET
22 bool
23
24config CPU_FREQ_GOV_COMMON
25 select CPU_FREQ_GOV_ATTR_SET
26 select IRQ_WORK
27 bool
28
29config CPU_FREQ_BOOST_SW
30 bool
31 depends on THERMAL
32
33config CPU_FREQ_STAT
34 bool "CPU frequency transition statistics"
35 help
36 Export CPU frequency statistics information through sysfs.
37
38 If in doubt, say N.
39
40config CPU_FREQ_TIMES
41 bool "CPU frequency time-in-state statistics"
42 help
43 Export CPU time-in-state information through procfs.
44
45 If in doubt, say N.
46
47choice
48 prompt "Default CPUFreq governor"
49 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
50 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
51 help
52 This option sets which CPUFreq governor shall be loaded at
53 startup. If in doubt, select 'performance'.
54
55config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
56 bool "performance"
57 select CPU_FREQ_GOV_PERFORMANCE
58 help
59 Use the CPUFreq governor 'performance' as default. This sets
60 the frequency statically to the highest frequency supported by
61 the CPU.
62
63config CPU_FREQ_DEFAULT_GOV_POWERSAVE
64 bool "powersave"
65 select CPU_FREQ_GOV_POWERSAVE
66 help
67 Use the CPUFreq governor 'powersave' as default. This sets
68 the frequency statically to the lowest frequency supported by
69 the CPU.
70
71config CPU_FREQ_DEFAULT_GOV_USERSPACE
72 bool "userspace"
73 select CPU_FREQ_GOV_USERSPACE
74 help
75 Use the CPUFreq governor 'userspace' as default. This allows
76 you to set the CPU frequency manually or when a userspace
77 program shall be able to set the CPU dynamically without having
78 to enable the userspace governor manually.
79
80config CPU_FREQ_DEFAULT_GOV_ONDEMAND
81 bool "ondemand"
82 select CPU_FREQ_GOV_ONDEMAND
83 select CPU_FREQ_GOV_PERFORMANCE
84 help
85 Use the CPUFreq governor 'ondemand' as default. This allows
86 you to get a full dynamic frequency capable system by simply
87 loading your cpufreq low-level hardware driver.
88 Be aware that not all cpufreq drivers support the ondemand
89 governor. If unsure have a look at the help section of the
90 driver. Fallback governor will be the performance governor.
91
92config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
93 bool "conservative"
94 select CPU_FREQ_GOV_CONSERVATIVE
95 select CPU_FREQ_GOV_PERFORMANCE
96 help
97 Use the CPUFreq governor 'conservative' as default. This allows
98 you to get a full dynamic frequency capable system by simply
99 loading your cpufreq low-level hardware driver.
100 Be aware that not all cpufreq drivers support the conservative
101 governor. If unsure have a look at the help section of the
102 driver. Fallback governor will be the performance governor.
103
104config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
105 bool "schedutil"
106 depends on SMP
107 select CPU_FREQ_GOV_SCHEDUTIL
108 select CPU_FREQ_GOV_PERFORMANCE
109 help
110 Use the 'schedutil' CPUFreq governor by default. If unsure,
111 have a look at the help section of that governor. The fallback
112 governor will be 'performance'.
113
114endchoice
115
116config CPU_FREQ_GOV_PERFORMANCE
117 tristate "'performance' governor"
118 help
119 This cpufreq governor sets the frequency statically to the
120 highest available CPU frequency.
121
122 To compile this driver as a module, choose M here: the
123 module will be called cpufreq_performance.
124
125 If in doubt, say Y.
126
127config CPU_FREQ_GOV_POWERSAVE
128 tristate "'powersave' governor"
129 help
130 This cpufreq governor sets the frequency statically to the
131 lowest available CPU frequency.
132
133 To compile this driver as a module, choose M here: the
134 module will be called cpufreq_powersave.
135
136 If in doubt, say Y.
137
138config CPU_FREQ_GOV_USERSPACE
139 tristate "'userspace' governor for userspace frequency scaling"
140 help
141 Enable this cpufreq governor when you either want to set the
142 CPU frequency manually or when a userspace program shall
143 be able to set the CPU dynamically, like on LART
144 <http://www.lartmaker.nl/>.
145
146 To compile this driver as a module, choose M here: the
147 module will be called cpufreq_userspace.
148
149 For details, take a look at <file:Documentation/cpu-freq/>.
150
151 If in doubt, say Y.
152
153config CPU_FREQ_GOV_ONDEMAND
154 tristate "'ondemand' cpufreq policy governor"
155 select CPU_FREQ_GOV_COMMON
156 help
157 'ondemand' - This driver adds a dynamic cpufreq policy governor.
158 The governor does a periodic polling and
159 changes frequency based on the CPU utilization.
160 The support for this governor depends on CPU capability to
161 do fast frequency switching (i.e, very low latency frequency
162 transitions).
163
164 To compile this driver as a module, choose M here: the
165 module will be called cpufreq_ondemand.
166
167 For details, take a look at linux/Documentation/cpu-freq.
168
169 If in doubt, say N.
170
171config CPU_FREQ_GOV_CONSERVATIVE
172 tristate "'conservative' cpufreq governor"
173 depends on CPU_FREQ
174 select CPU_FREQ_GOV_COMMON
175 help
176 'conservative' - this driver is rather similar to the 'ondemand'
177 governor both in its source code and its purpose, the difference is
178 its optimisation for better suitability in a battery powered
179 environment. The frequency is gracefully increased and decreased
180 rather than jumping to 100% when speed is required.
181
182 If you have a desktop machine then you should really be considering
183 the 'ondemand' governor instead, however if you are using a laptop,
184 PDA or even an AMD64 based computer (due to the unacceptable
185 step-by-step latency issues between the minimum and maximum frequency
186 transitions in the CPU) you will probably want to use this governor.
187
188 To compile this driver as a module, choose M here: the
189 module will be called cpufreq_conservative.
190
191 For details, take a look at linux/Documentation/cpu-freq.
192
193 If in doubt, say N.
194
195config CPU_FREQ_GOV_SCHEDUTIL
196 bool "'schedutil' cpufreq policy governor"
197 depends on CPU_FREQ && SMP
198 select CPU_FREQ_GOV_ATTR_SET
199 select IRQ_WORK
200 help
201 This governor makes decisions based on the utilization data provided
202 by the scheduler. It sets the CPU frequency to be proportional to
203 the utilization/capacity ratio coming from the scheduler. If the
204 utilization is frequency-invariant, the new frequency is also
205 proportional to the maximum available frequency. If that is not the
206 case, it is proportional to the current frequency of the CPU. The
207 frequency tipping point is at utilization/capacity equal to 80% in
208 both cases.
209
210 If in doubt, say N.
211
212comment "CPU frequency scaling drivers"
213
214config CPUFREQ_DT
215 tristate "Generic DT based cpufreq driver"
216 depends on HAVE_CLK && OF
217 # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
218 depends on !CPU_THERMAL || THERMAL
219 select CPUFREQ_DT_PLATDEV
220 select PM_OPP
221 help
222 This adds a generic DT based cpufreq driver for frequency management.
223 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
224 systems.
225
226 If in doubt, say N.
227
228config CPUFREQ_DT_PLATDEV
229 bool
230 help
231 This adds a generic DT based cpufreq platdev driver for frequency
232 management. This creates a 'cpufreq-dt' platform device, on the
233 supported platforms.
234
235 If in doubt, say N.
236
237if X86
238source "drivers/cpufreq/Kconfig.x86"
239endif
240
241if ARM || ARM64
242source "drivers/cpufreq/Kconfig.arm"
243endif
244
245if PPC32 || PPC64
246source "drivers/cpufreq/Kconfig.powerpc"
247endif
248
249if AVR32
250config AVR32_AT32AP_CPUFREQ
251 bool "CPU frequency driver for AT32AP"
252 depends on PLATFORM_AT32AP
253 default n
254 help
255 This enables the CPU frequency driver for AT32AP processors.
256 If in doubt, say N.
257endif
258
259if IA64
260config IA64_ACPI_CPUFREQ
261 tristate "ACPI Processor P-States driver"
262 depends on ACPI_PROCESSOR
263 help
264 This driver adds a CPUFreq driver which utilizes the ACPI
265 Processor Performance States.
266
267 For details, take a look at <file:Documentation/cpu-freq/>.
268
269 If in doubt, say N.
270endif
271
272if MIPS
273config BMIPS_CPUFREQ
274 tristate "BMIPS CPUfreq Driver"
275 help
276 This option adds a CPUfreq driver for BMIPS processors with
277 support for configurable CPU frequency.
278
279 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
280
281 If in doubt, say N.
282
283config LOONGSON2_CPUFREQ
284 tristate "Loongson2 CPUFreq Driver"
285 depends on LEMOTE_MACH2F
286 help
287 This option adds a CPUFreq driver for loongson processors which
288 support software configurable cpu frequency.
289
290 Loongson2F and it's successors support this feature.
291
292 For details, take a look at <file:Documentation/cpu-freq/>.
293
294 If in doubt, say N.
295
296config LOONGSON1_CPUFREQ
297 tristate "Loongson1 CPUFreq Driver"
298 depends on LOONGSON1_LS1B
299 help
300 This option adds a CPUFreq driver for loongson1 processors which
301 support software configurable cpu frequency.
302
303 For details, take a look at <file:Documentation/cpu-freq/>.
304
305 If in doubt, say N.
306endif
307
308if SPARC64
309config SPARC_US3_CPUFREQ
310 tristate "UltraSPARC-III CPU Frequency driver"
311 help
312 This adds the CPUFreq driver for UltraSPARC-III processors.
313
314 For details, take a look at <file:Documentation/cpu-freq>.
315
316 If in doubt, say N.
317
318config SPARC_US2E_CPUFREQ
319 tristate "UltraSPARC-IIe CPU Frequency driver"
320 help
321 This adds the CPUFreq driver for UltraSPARC-IIe processors.
322
323 For details, take a look at <file:Documentation/cpu-freq>.
324
325 If in doubt, say N.
326endif
327
328if SUPERH
329config SH_CPU_FREQ
330 tristate "SuperH CPU Frequency driver"
331 help
332 This adds the cpufreq driver for SuperH. Any CPU that supports
333 clock rate rounding through the clock framework can use this
334 driver. While it will make the kernel slightly larger, this is
335 harmless for CPUs that don't support rate rounding. The driver
336 will also generate a notice in the boot log before disabling
337 itself if the CPU in question is not capable of rate rounding.
338
339 For details, take a look at <file:Documentation/cpu-freq>.
340
341 If unsure, say N.
342endif
343
344config QORIQ_CPUFREQ
345 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
346 depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
347 depends on !CPU_THERMAL || THERMAL
348 select CLK_QORIQ
349 help
350 This adds the CPUFreq driver support for Freescale QorIQ SoCs
351 which are capable of changing the CPU's frequency dynamically.
352
353endif
354endmenu