• 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 ANDROID_V_CPUFREQ_VIRT
228	tristate "Android-V Virtual cpufreq driver"
229	depends on OF && GENERIC_ARCH_TOPOLOGY
230	select PM_OPP
231	help
232	  This adds a virtualized cpufreq driver for guest kernels that
233	  read/writes to a MMIO region for a virtualized cpufreq device to
234	  communicate with the host. It sends frequency updates to the host
235	  which gets used as a hint to schedule vCPU threads and select CPU
236	  frequency. If a VM does not support a virtualized FIE such as AMUs,
237	  it updates the frequency scaling factor by polling host CPU frequency
238	  to enable accurate Per-Entity Load Tracking for tasks running in the guest.
239
240	  If in doubt, say N.
241
242config CPUFREQ_DT_PLATDEV
243	tristate "Generic DT based cpufreq platdev driver"
244	depends on OF
245	help
246	  This adds a generic DT based cpufreq platdev driver for frequency
247	  management.  This creates a 'cpufreq-dt' platform device, on the
248	  supported platforms.
249
250	  If in doubt, say N.
251
252config CPUFREQ_DUMMY
253	tristate "Dummy CPU frequency driver"
254	help
255	  This option adds a generic dummy CPUfreq driver, which sets a fake
256	  2-frequency table when initializing each policy and otherwise does
257	  nothing.
258
259	  If in doubt, say N
260
261if X86
262source "drivers/cpufreq/Kconfig.x86"
263endif
264
265if ARM || ARM64
266source "drivers/cpufreq/Kconfig.arm"
267endif
268
269if PPC32 || PPC64
270source "drivers/cpufreq/Kconfig.powerpc"
271endif
272
273if IA64
274config IA64_ACPI_CPUFREQ
275	tristate "ACPI Processor P-States driver"
276	depends on ACPI_PROCESSOR
277	help
278	This driver adds a CPUFreq driver which utilizes the ACPI
279	Processor Performance States.
280
281	If in doubt, say N.
282endif
283
284if MIPS
285config BMIPS_CPUFREQ
286	tristate "BMIPS CPUfreq Driver"
287	help
288	  This option adds a CPUfreq driver for BMIPS processors with
289	  support for configurable CPU frequency.
290
291	  For now, BMIPS5 chips are supported (such as the Broadcom 7425).
292
293	  If in doubt, say N.
294
295config LOONGSON2_CPUFREQ
296	tristate "Loongson2 CPUFreq Driver"
297	depends on LEMOTE_MACH2F
298	help
299	  This option adds a CPUFreq driver for loongson processors which
300	  support software configurable cpu frequency.
301
302	  Loongson2F and its successors support this feature.
303
304	  If in doubt, say N.
305endif
306
307if SPARC64
308config SPARC_US3_CPUFREQ
309	tristate "UltraSPARC-III CPU Frequency driver"
310	help
311	  This adds the CPUFreq driver for UltraSPARC-III processors.
312
313	  If in doubt, say N.
314
315config SPARC_US2E_CPUFREQ
316	tristate "UltraSPARC-IIe CPU Frequency driver"
317	help
318	  This adds the CPUFreq driver for UltraSPARC-IIe processors.
319
320	  If in doubt, say N.
321endif
322
323if SUPERH
324config SH_CPU_FREQ
325	tristate "SuperH CPU Frequency driver"
326	help
327	  This adds the cpufreq driver for SuperH. Any CPU that supports
328	  clock rate rounding through the clock framework can use this
329	  driver. While it will make the kernel slightly larger, this is
330	  harmless for CPUs that don't support rate rounding. The driver
331	  will also generate a notice in the boot log before disabling
332	  itself if the CPU in question is not capable of rate rounding.
333
334	  If unsure, say N.
335endif
336
337config QORIQ_CPUFREQ
338	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
339	depends on OF && COMMON_CLK
340	depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
341	select CLK_QORIQ
342	help
343	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
344	  which are capable of changing the CPU's frequency dynamically.
345
346endif
347endmenu
348