• 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	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
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_SA1110_CPUFREQ
47	default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
48	default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_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	  If in doubt, say Y.
151
152config CPU_FREQ_GOV_ONDEMAND
153	tristate "'ondemand' cpufreq policy governor"
154	select CPU_FREQ_GOV_COMMON
155	help
156	  'ondemand' - This driver adds a dynamic cpufreq policy governor.
157	  The governor does a periodic polling and
158	  changes frequency based on the CPU utilization.
159	  The support for this governor depends on CPU capability to
160	  do fast frequency switching (i.e, very low latency frequency
161	  transitions).
162
163	  To compile this driver as a module, choose M here: the
164	  module will be called cpufreq_ondemand.
165
166	  For details, take a look at
167	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
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
192	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
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_VIRT
228	tristate "Virtual cpufreq driver"
229	depends on GENERIC_ARCH_TOPOLOGY
230	help
231	  This adds a virtualized cpufreq driver for guest kernels that
232	  read/writes to a MMIO region for a virtualized cpufreq device to
233	  communicate with the host. It sends performance requests to the host
234	  which gets used as a hint to schedule vCPU threads and select CPU
235	  frequency. If a VM does not support a virtualized FIE such as AMUs,
236	  it updates the frequency scaling factor by polling host CPU frequency
237	  to enable accurate Per-Entity Load Tracking for tasks running in the guest.
238
239	  If in doubt, say N.
240
241config CPUFREQ_DT_PLATDEV
242	tristate "Generic DT based cpufreq platdev driver"
243	depends on OF
244	help
245	  This adds a generic DT based cpufreq platdev driver for frequency
246	  management.  This creates a 'cpufreq-dt' platform device, on the
247	  supported platforms.
248
249	  If in doubt, say N.
250
251config CPUFREQ_DUMMY
252	tristate "Dummy CPU frequency driver"
253	help
254	  This option adds a generic dummy CPUfreq driver, which sets a fake
255	  2-frequency table when initializing each policy and otherwise does
256	  nothing.
257
258	  If in doubt, say N
259
260if X86
261source "drivers/cpufreq/Kconfig.x86"
262endif
263
264source "drivers/cpufreq/Kconfig.arm"
265
266if PPC32 || PPC64
267source "drivers/cpufreq/Kconfig.powerpc"
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 its successors support this feature.
289
290	  If in doubt, say N.
291endif
292
293if LOONGARCH
294config LOONGSON3_CPUFREQ
295	tristate "Loongson3 CPUFreq Driver"
296	help
297	  This option adds a CPUFreq driver for Loongson processors which
298	  support software configurable cpu frequency.
299
300	  Loongson-3 family processors support this feature.
301
302	  If in doubt, say N.
303endif
304
305if SPARC64
306config SPARC_US3_CPUFREQ
307	tristate "UltraSPARC-III CPU Frequency driver"
308	help
309	  This adds the CPUFreq driver for UltraSPARC-III processors.
310
311	  If in doubt, say N.
312
313config SPARC_US2E_CPUFREQ
314	tristate "UltraSPARC-IIe CPU Frequency driver"
315	help
316	  This adds the CPUFreq driver for UltraSPARC-IIe processors.
317
318	  If in doubt, say N.
319endif
320
321if SUPERH
322config SH_CPU_FREQ
323	tristate "SuperH CPU Frequency driver"
324	help
325	  This adds the cpufreq driver for SuperH. Any CPU that supports
326	  clock rate rounding through the clock framework can use this
327	  driver. While it will make the kernel slightly larger, this is
328	  harmless for CPUs that don't support rate rounding. The driver
329	  will also generate a notice in the boot log before disabling
330	  itself if the CPU in question is not capable of rate rounding.
331
332	  If unsure, say N.
333endif
334
335config QORIQ_CPUFREQ
336	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
337	depends on OF && COMMON_CLK
338	depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
339	select CLK_QORIQ
340	help
341	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
342	  which are capable of changing the CPU's frequency dynamically.
343
344config ACPI_CPPC_CPUFREQ
345	tristate "CPUFreq driver based on the ACPI CPPC spec"
346	depends on ACPI_PROCESSOR
347	depends on ARM || ARM64 || RISCV
348	select ACPI_CPPC_LIB
349	help
350	  This adds a CPUFreq driver which uses CPPC methods
351	  as described in the ACPIv5.1 spec. CPPC stands for
352	  Collaborative Processor Performance Controls. It
353	  is based on an abstract continuous scale of CPU
354	  performance values which allows the remote power
355	  processor to flexibly optimize for power and
356	  performance. CPPC relies on power management firmware
357	  support for its operation.
358
359	  If in doubt, say N.
360
361config ACPI_CPPC_CPUFREQ_FIE
362	bool "Frequency Invariance support for CPPC cpufreq driver"
363	depends on ACPI_CPPC_CPUFREQ && GENERIC_ARCH_TOPOLOGY
364	depends on ARM || ARM64 || RISCV
365	default y
366	help
367	  This extends frequency invariance support in the CPPC cpufreq driver,
368	  by using CPPC delivered and reference performance counters.
369
370	  If in doubt, say N.
371
372endif
373
374endmenu
375