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