blob: 85de313ddec29cdc33824ec98964abe2bae8c962 [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Dave Jonesbb0a56e2011-05-19 18:51:07 -04002menu "CPU Frequency scaling"
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004config CPU_FREQ
5 bool "CPU Frequency scaling"
Pranith Kumar83fe27e2014-12-05 11:24:45 -05006 select SRCU
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 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
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010022config CPU_FREQ_GOV_ATTR_SET
23 bool
24
Larry Finger1e15f292012-12-29 01:55:20 +000025config CPU_FREQ_GOV_COMMON
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010026 select CPU_FREQ_GOV_ATTR_SET
Rafael J. Wysockie6f03652016-02-28 02:33:29 +010027 select IRQ_WORK
Larry Finger1e15f292012-12-29 01:55:20 +000028 bool
29
Linus Torvalds1da177e2005-04-16 15:20:36 -070030config CPU_FREQ_STAT
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020031 bool "CPU frequency transition statistics"
Mike Frysinger9101be52007-04-18 16:18:13 -040032 help
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020033 Export CPU frequency statistics information through sysfs.
Mike Frysinger9101be52007-04-18 16:18:13 -040034
35 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Linus Torvalds1da177e2005-04-16 15:20:36 -070037choice
38 prompt "Default CPUFreq governor"
Alexander Shiyan559f56c2013-05-05 12:18:08 +000039 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
Valentin Schneiderf259eab2020-07-22 10:37:32 +010040 default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
Rafael J. Wysockia00ec382020-03-26 20:24:35 +010041 default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
Linus Torvalds1da177e2005-04-16 15:20:36 -070042 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
43 help
44 This option sets which CPUFreq governor shall be loaded at
Rafael J. Wysockia00ec382020-03-26 20:24:35 +010045 startup. If in doubt, use the default setting.
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
48 bool "performance"
49 select CPU_FREQ_GOV_PERFORMANCE
50 help
51 Use the CPUFreq governor 'performance' as default. This sets
52 the frequency statically to the highest frequency supported by
53 the CPU.
54
Alessandro Guido30d221d2008-04-18 13:31:13 -070055config CPU_FREQ_DEFAULT_GOV_POWERSAVE
56 bool "powersave"
Alessandro Guido30d221d2008-04-18 13:31:13 -070057 select CPU_FREQ_GOV_POWERSAVE
58 help
59 Use the CPUFreq governor 'powersave' as default. This sets
60 the frequency statically to the lowest frequency supported by
61 the CPU.
62
Linus Torvalds1da177e2005-04-16 15:20:36 -070063config CPU_FREQ_DEFAULT_GOV_USERSPACE
64 bool "userspace"
65 select CPU_FREQ_GOV_USERSPACE
66 help
67 Use the CPUFreq governor 'userspace' as default. This allows
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +010068 you to set the CPU frequency manually or when a userspace
Linus Torvalds1da177e2005-04-16 15:20:36 -070069 program shall be able to set the CPU dynamically without having
70 to enable the userspace governor manually.
71
Thomas Renninger1c256242007-10-02 13:28:12 -070072config CPU_FREQ_DEFAULT_GOV_ONDEMAND
73 bool "ondemand"
Rafael J. Wysockidb865272020-10-23 17:15:56 +020074 depends on !(X86_INTEL_PSTATE && SMP)
Thomas Renninger1c256242007-10-02 13:28:12 -070075 select CPU_FREQ_GOV_ONDEMAND
76 select CPU_FREQ_GOV_PERFORMANCE
77 help
78 Use the CPUFreq governor 'ondemand' as default. This allows
79 you to get a full dynamic frequency capable system by simply
80 loading your cpufreq low-level hardware driver.
81 Be aware that not all cpufreq drivers support the ondemand
82 governor. If unsure have a look at the help section of the
83 driver. Fallback governor will be the performance governor.
84
85config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
86 bool "conservative"
Rafael J. Wysockidb865272020-10-23 17:15:56 +020087 depends on !(X86_INTEL_PSTATE && SMP)
Thomas Renninger1c256242007-10-02 13:28:12 -070088 select CPU_FREQ_GOV_CONSERVATIVE
89 select CPU_FREQ_GOV_PERFORMANCE
90 help
91 Use the CPUFreq governor 'conservative' as default. This allows
92 you to get a full dynamic frequency capable system by simply
93 loading your cpufreq low-level hardware driver.
94 Be aware that not all cpufreq drivers support the conservative
95 governor. If unsure have a look at the help section of the
96 driver. Fallback governor will be the performance governor.
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +020097
98config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
99 bool "schedutil"
Arnd Bergmanncfe94922016-05-11 14:52:01 +0200100 depends on SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200101 select CPU_FREQ_GOV_SCHEDUTIL
102 select CPU_FREQ_GOV_PERFORMANCE
103 help
104 Use the 'schedutil' CPUFreq governor by default. If unsure,
105 have a look at the help section of that governor. The fallback
106 governor will be 'performance'.
107
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108endchoice
109
110config CPU_FREQ_GOV_PERFORMANCE
Mike Frysinger9101be52007-04-18 16:18:13 -0400111 tristate "'performance' governor"
112 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113 This cpufreq governor sets the frequency statically to the
114 highest available CPU frequency.
115
Mike Frysinger9101be52007-04-18 16:18:13 -0400116 To compile this driver as a module, choose M here: the
117 module will be called cpufreq_performance.
118
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119 If in doubt, say Y.
120
121config CPU_FREQ_GOV_POWERSAVE
Mike Frysinger9101be52007-04-18 16:18:13 -0400122 tristate "'powersave' governor"
123 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124 This cpufreq governor sets the frequency statically to the
125 lowest available CPU frequency.
126
Mike Frysinger9101be52007-04-18 16:18:13 -0400127 To compile this driver as a module, choose M here: the
128 module will be called cpufreq_powersave.
129
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130 If in doubt, say Y.
131
132config CPU_FREQ_GOV_USERSPACE
Mike Frysinger9101be52007-04-18 16:18:13 -0400133 tristate "'userspace' governor for userspace frequency scaling"
134 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135 Enable this cpufreq governor when you either want to set the
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +0100136 CPU frequency manually or when a userspace program shall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 be able to set the CPU dynamically, like on LART
Erik Mouw4c412512006-04-03 14:21:00 +0200138 <http://www.lartmaker.nl/>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139
Mike Frysinger9101be52007-04-18 16:18:13 -0400140 To compile this driver as a module, choose M here: the
141 module will be called cpufreq_userspace.
142
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143 For details, take a look at <file:Documentation/cpu-freq/>.
144
145 If in doubt, say Y.
146
147config CPU_FREQ_GOV_ONDEMAND
148 tristate "'ondemand' cpufreq policy governor"
Larry Finger1e15f292012-12-29 01:55:20 +0000149 select CPU_FREQ_GOV_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 help
151 'ondemand' - This driver adds a dynamic cpufreq policy governor.
152 The governor does a periodic polling and
153 changes frequency based on the CPU utilization.
154 The support for this governor depends on CPU capability to
155 do fast frequency switching (i.e, very low latency frequency
156 transitions).
157
Mike Frysinger9101be52007-04-18 16:18:13 -0400158 To compile this driver as a module, choose M here: the
159 module will be called cpufreq_ondemand.
160
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 For details, take a look at linux/Documentation/cpu-freq.
162
163 If in doubt, say N.
164
Dave Jonesb9170832005-05-31 19:03:47 -0700165config CPU_FREQ_GOV_CONSERVATIVE
166 tristate "'conservative' cpufreq governor"
167 depends on CPU_FREQ
Larry Finger1e15f292012-12-29 01:55:20 +0000168 select CPU_FREQ_GOV_COMMON
Dave Jonesb9170832005-05-31 19:03:47 -0700169 help
170 'conservative' - this driver is rather similar to the 'ondemand'
171 governor both in its source code and its purpose, the difference is
172 its optimisation for better suitability in a battery powered
173 environment. The frequency is gracefully increased and decreased
174 rather than jumping to 100% when speed is required.
175
176 If you have a desktop machine then you should really be considering
177 the 'ondemand' governor instead, however if you are using a laptop,
178 PDA or even an AMD64 based computer (due to the unacceptable
179 step-by-step latency issues between the minimum and maximum frequency
180 transitions in the CPU) you will probably want to use this governor.
181
Mike Frysinger9101be52007-04-18 16:18:13 -0400182 To compile this driver as a module, choose M here: the
183 module will be called cpufreq_conservative.
184
Dave Jonesb9170832005-05-31 19:03:47 -0700185 For details, take a look at linux/Documentation/cpu-freq.
186
187 If in doubt, say N.
188
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200189config CPU_FREQ_GOV_SCHEDUTIL
Rafael J. Wysocki58919e82016-08-16 22:14:55 +0200190 bool "'schedutil' cpufreq policy governor"
Rafael J. Wysockibf7cdff2016-05-06 15:00:38 +0200191 depends on CPU_FREQ && SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200192 select CPU_FREQ_GOV_ATTR_SET
193 select IRQ_WORK
194 help
195 This governor makes decisions based on the utilization data provided
196 by the scheduler. It sets the CPU frequency to be proportional to
197 the utilization/capacity ratio coming from the scheduler. If the
198 utilization is frequency-invariant, the new frequency is also
199 proportional to the maximum available frequency. If that is not the
200 case, it is proportional to the current frequency of the CPU. The
201 frequency tipping point is at utilization/capacity equal to 80% in
202 both cases.
203
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200204 If in doubt, say N.
205
Viresh Kumarf41f4812014-11-15 08:50:44 +0530206comment "CPU frequency scaling drivers"
207
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530208config CPUFREQ_DT
209 tristate "Generic DT based cpufreq driver"
Viresh Kumar5fbfbcd2014-06-10 10:39:46 +0530210 depends on HAVE_CLK && OF
Viresh Kumarf56aad12016-03-30 13:45:26 +0530211 select CPUFREQ_DT_PLATDEV
Mark Brown109df082013-12-11 22:12:27 +0000212 select PM_OPP
Shawn Guo95ceafd2012-09-06 07:09:11 +0000213 help
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530214 This adds a generic DT based cpufreq driver for frequency management.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000215 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
Viresh Kumar33cc4fc2016-09-09 16:48:07 +0530216 systems.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000217
218 If in doubt, say N.
219
Viresh Kumarf56aad12016-03-30 13:45:26 +0530220config CPUFREQ_DT_PLATDEV
221 bool
222 help
223 This adds a generic DT based cpufreq platdev driver for frequency
224 management. This creates a 'cpufreq-dt' platform device, on the
225 supported platforms.
226
227 If in doubt, say N.
228
Viresh Kumarf41f4812014-11-15 08:50:44 +0530229if X86
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400230source "drivers/cpufreq/Kconfig.x86"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530231endif
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400232
Viresh Kumarf41f4812014-11-15 08:50:44 +0530233if ARM || ARM64
Kukjin Kimf7d77072011-06-01 14:18:22 -0700234source "drivers/cpufreq/Kconfig.arm"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530235endif
Kukjin Kimf7d77072011-06-01 14:18:22 -0700236
Viresh Kumarf41f4812014-11-15 08:50:44 +0530237if PPC32 || PPC64
238source "drivers/cpufreq/Kconfig.powerpc"
239endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000240
Viresh Kumarf41f4812014-11-15 08:50:44 +0530241if IA64
Viresh Kumarab423e42013-04-04 12:54:20 +0000242config IA64_ACPI_CPUFREQ
243 tristate "ACPI Processor P-States driver"
Viresh Kumarab423e42013-04-04 12:54:20 +0000244 depends on ACPI_PROCESSOR
245 help
246 This driver adds a CPUFreq driver which utilizes the ACPI
247 Processor Performance States.
248
249 For details, take a look at <file:Documentation/cpu-freq/>.
250
251 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530252endif
Viresh Kumarab423e42013-04-04 12:54:20 +0000253
Viresh Kumarf41f4812014-11-15 08:50:44 +0530254if MIPS
Markus Mayercdb56cb2017-02-07 13:58:55 -0800255config BMIPS_CPUFREQ
256 tristate "BMIPS CPUfreq Driver"
257 help
258 This option adds a CPUfreq driver for BMIPS processors with
259 support for configurable CPU frequency.
260
261 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
262
263 If in doubt, say N.
264
Viresh Kumar7a998932013-04-04 12:54:21 +0000265config LOONGSON2_CPUFREQ
266 tristate "Loongson2 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000267 depends on LEMOTE_MACH2F
Viresh Kumar7a998932013-04-04 12:54:21 +0000268 help
269 This option adds a CPUFreq driver for loongson processors which
270 support software configurable cpu frequency.
271
272 Loongson2F and it's successors support this feature.
273
274 For details, take a look at <file:Documentation/cpu-freq/>.
275
276 If in doubt, say N.
277
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800278config LOONGSON1_CPUFREQ
279 tristate "Loongson1 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000280 depends on LOONGSON1_LS1B
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800281 help
282 This option adds a CPUFreq driver for loongson1 processors which
283 support software configurable cpu frequency.
284
285 For details, take a look at <file:Documentation/cpu-freq/>.
286
287 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530288endif
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800289
Viresh Kumarf41f4812014-11-15 08:50:44 +0530290if SPARC64
Viresh Kumar764295a2013-04-04 12:54:24 +0000291config SPARC_US3_CPUFREQ
292 tristate "UltraSPARC-III CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000293 help
294 This adds the CPUFreq driver for UltraSPARC-III processors.
295
296 For details, take a look at <file:Documentation/cpu-freq>.
297
298 If in doubt, say N.
299
300config SPARC_US2E_CPUFREQ
301 tristate "UltraSPARC-IIe CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000302 help
303 This adds the CPUFreq driver for UltraSPARC-IIe processors.
304
305 For details, take a look at <file:Documentation/cpu-freq>.
306
307 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530308endif
Viresh Kumar764295a2013-04-04 12:54:24 +0000309
Viresh Kumarf41f4812014-11-15 08:50:44 +0530310if SUPERH
Viresh Kumar72582672013-04-04 12:54:22 +0000311config SH_CPU_FREQ
312 tristate "SuperH CPU Frequency driver"
Viresh Kumar72582672013-04-04 12:54:22 +0000313 help
314 This adds the cpufreq driver for SuperH. Any CPU that supports
315 clock rate rounding through the clock framework can use this
316 driver. While it will make the kernel slightly larger, this is
317 harmless for CPUs that don't support rate rounding. The driver
318 will also generate a notice in the boot log before disabling
319 itself if the CPU in question is not capable of rate rounding.
320
321 For details, take a look at <file:Documentation/cpu-freq>.
322
323 If unsure, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530324endif
Viresh Kumar72582672013-04-04 12:54:22 +0000325
Tang Yuantian2f249352015-03-13 12:39:02 +0800326config QORIQ_CPUFREQ
327 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
Geert Uytterhoeven1f1755a2020-05-07 13:29:53 +0200328 depends on OF && COMMON_CLK
329 depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
Tang Yuantian2f249352015-03-13 12:39:02 +0800330 select CLK_QORIQ
331 help
332 This adds the CPUFreq driver support for Freescale QorIQ SoCs
333 which are capable of changing the CPU's frequency dynamically.
334
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400335endif
336endmenu