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