blob: e917501325525f168d03c18340d9134eb30ad7aa [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
Linus Walleij8fdcca82020-04-02 10:02:39 +020040 default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if BIG_LITTLE
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"
74 select CPU_FREQ_GOV_ONDEMAND
75 select CPU_FREQ_GOV_PERFORMANCE
76 help
77 Use the CPUFreq governor 'ondemand' as default. This allows
78 you to get a full dynamic frequency capable system by simply
79 loading your cpufreq low-level hardware driver.
80 Be aware that not all cpufreq drivers support the ondemand
81 governor. If unsure have a look at the help section of the
82 driver. Fallback governor will be the performance governor.
83
84config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
85 bool "conservative"
86 select CPU_FREQ_GOV_CONSERVATIVE
87 select CPU_FREQ_GOV_PERFORMANCE
88 help
89 Use the CPUFreq governor 'conservative' as default. This allows
90 you to get a full dynamic frequency capable system by simply
91 loading your cpufreq low-level hardware driver.
92 Be aware that not all cpufreq drivers support the conservative
93 governor. If unsure have a look at the help section of the
94 driver. Fallback governor will be the performance governor.
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +020095
96config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
97 bool "schedutil"
Arnd Bergmanncfe94922016-05-11 14:52:01 +020098 depends on SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +020099 select CPU_FREQ_GOV_SCHEDUTIL
100 select CPU_FREQ_GOV_PERFORMANCE
101 help
102 Use the 'schedutil' CPUFreq governor by default. If unsure,
103 have a look at the help section of that governor. The fallback
104 governor will be 'performance'.
105
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106endchoice
107
108config CPU_FREQ_GOV_PERFORMANCE
Mike Frysinger9101be52007-04-18 16:18:13 -0400109 tristate "'performance' governor"
110 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 This cpufreq governor sets the frequency statically to the
112 highest available CPU frequency.
113
Mike Frysinger9101be52007-04-18 16:18:13 -0400114 To compile this driver as a module, choose M here: the
115 module will be called cpufreq_performance.
116
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117 If in doubt, say Y.
118
119config CPU_FREQ_GOV_POWERSAVE
Mike Frysinger9101be52007-04-18 16:18:13 -0400120 tristate "'powersave' governor"
121 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122 This cpufreq governor sets the frequency statically to the
123 lowest available CPU frequency.
124
Mike Frysinger9101be52007-04-18 16:18:13 -0400125 To compile this driver as a module, choose M here: the
126 module will be called cpufreq_powersave.
127
Linus Torvalds1da177e2005-04-16 15:20:36 -0700128 If in doubt, say Y.
129
130config CPU_FREQ_GOV_USERSPACE
Mike Frysinger9101be52007-04-18 16:18:13 -0400131 tristate "'userspace' governor for userspace frequency scaling"
132 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133 Enable this cpufreq governor when you either want to set the
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +0100134 CPU frequency manually or when a userspace program shall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135 be able to set the CPU dynamically, like on LART
Erik Mouw4c412512006-04-03 14:21:00 +0200136 <http://www.lartmaker.nl/>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137
Mike Frysinger9101be52007-04-18 16:18:13 -0400138 To compile this driver as a module, choose M here: the
139 module will be called cpufreq_userspace.
140
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 For details, take a look at <file:Documentation/cpu-freq/>.
142
143 If in doubt, say Y.
144
145config CPU_FREQ_GOV_ONDEMAND
146 tristate "'ondemand' cpufreq policy governor"
Larry Finger1e15f292012-12-29 01:55:20 +0000147 select CPU_FREQ_GOV_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148 help
149 'ondemand' - This driver adds a dynamic cpufreq policy governor.
150 The governor does a periodic polling and
151 changes frequency based on the CPU utilization.
152 The support for this governor depends on CPU capability to
153 do fast frequency switching (i.e, very low latency frequency
154 transitions).
155
Mike Frysinger9101be52007-04-18 16:18:13 -0400156 To compile this driver as a module, choose M here: the
157 module will be called cpufreq_ondemand.
158
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159 For details, take a look at linux/Documentation/cpu-freq.
160
161 If in doubt, say N.
162
Dave Jonesb9170832005-05-31 19:03:47 -0700163config CPU_FREQ_GOV_CONSERVATIVE
164 tristate "'conservative' cpufreq governor"
165 depends on CPU_FREQ
Larry Finger1e15f292012-12-29 01:55:20 +0000166 select CPU_FREQ_GOV_COMMON
Dave Jonesb9170832005-05-31 19:03:47 -0700167 help
168 'conservative' - this driver is rather similar to the 'ondemand'
169 governor both in its source code and its purpose, the difference is
170 its optimisation for better suitability in a battery powered
171 environment. The frequency is gracefully increased and decreased
172 rather than jumping to 100% when speed is required.
173
174 If you have a desktop machine then you should really be considering
175 the 'ondemand' governor instead, however if you are using a laptop,
176 PDA or even an AMD64 based computer (due to the unacceptable
177 step-by-step latency issues between the minimum and maximum frequency
178 transitions in the CPU) you will probably want to use this governor.
179
Mike Frysinger9101be52007-04-18 16:18:13 -0400180 To compile this driver as a module, choose M here: the
181 module will be called cpufreq_conservative.
182
Dave Jonesb9170832005-05-31 19:03:47 -0700183 For details, take a look at linux/Documentation/cpu-freq.
184
185 If in doubt, say N.
186
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200187config CPU_FREQ_GOV_SCHEDUTIL
Rafael J. Wysocki58919e82016-08-16 22:14:55 +0200188 bool "'schedutil' cpufreq policy governor"
Rafael J. Wysockibf7cdff2016-05-06 15:00:38 +0200189 depends on CPU_FREQ && SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200190 select CPU_FREQ_GOV_ATTR_SET
191 select IRQ_WORK
192 help
193 This governor makes decisions based on the utilization data provided
194 by the scheduler. It sets the CPU frequency to be proportional to
195 the utilization/capacity ratio coming from the scheduler. If the
196 utilization is frequency-invariant, the new frequency is also
197 proportional to the maximum available frequency. If that is not the
198 case, it is proportional to the current frequency of the CPU. The
199 frequency tipping point is at utilization/capacity equal to 80% in
200 both cases.
201
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200202 If in doubt, say N.
203
Viresh Kumarf41f4812014-11-15 08:50:44 +0530204comment "CPU frequency scaling drivers"
205
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530206config CPUFREQ_DT
207 tristate "Generic DT based cpufreq driver"
Viresh Kumar5fbfbcd2014-06-10 10:39:46 +0530208 depends on HAVE_CLK && OF
Viresh Kumarf56aad12016-03-30 13:45:26 +0530209 select CPUFREQ_DT_PLATDEV
Mark Brown109df082013-12-11 22:12:27 +0000210 select PM_OPP
Shawn Guo95ceafd2012-09-06 07:09:11 +0000211 help
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530212 This adds a generic DT based cpufreq driver for frequency management.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000213 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
Viresh Kumar33cc4fc2016-09-09 16:48:07 +0530214 systems.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000215
216 If in doubt, say N.
217
Viresh Kumarf56aad12016-03-30 13:45:26 +0530218config CPUFREQ_DT_PLATDEV
219 bool
220 help
221 This adds a generic DT based cpufreq platdev driver for frequency
222 management. This creates a 'cpufreq-dt' platform device, on the
223 supported platforms.
224
225 If in doubt, say N.
226
Viresh Kumarf41f4812014-11-15 08:50:44 +0530227if X86
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400228source "drivers/cpufreq/Kconfig.x86"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530229endif
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400230
Viresh Kumarf41f4812014-11-15 08:50:44 +0530231if ARM || ARM64
Kukjin Kimf7d77072011-06-01 14:18:22 -0700232source "drivers/cpufreq/Kconfig.arm"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530233endif
Kukjin Kimf7d77072011-06-01 14:18:22 -0700234
Viresh Kumarf41f4812014-11-15 08:50:44 +0530235if PPC32 || PPC64
236source "drivers/cpufreq/Kconfig.powerpc"
237endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000238
Viresh Kumarf41f4812014-11-15 08:50:44 +0530239if IA64
Viresh Kumarab423e42013-04-04 12:54:20 +0000240config IA64_ACPI_CPUFREQ
241 tristate "ACPI Processor P-States driver"
Viresh Kumarab423e42013-04-04 12:54:20 +0000242 depends on ACPI_PROCESSOR
243 help
244 This driver adds a CPUFreq driver which utilizes the ACPI
245 Processor Performance States.
246
247 For details, take a look at <file:Documentation/cpu-freq/>.
248
249 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530250endif
Viresh Kumarab423e42013-04-04 12:54:20 +0000251
Viresh Kumarf41f4812014-11-15 08:50:44 +0530252if MIPS
Markus Mayercdb56cb2017-02-07 13:58:55 -0800253config BMIPS_CPUFREQ
254 tristate "BMIPS CPUfreq Driver"
255 help
256 This option adds a CPUfreq driver for BMIPS processors with
257 support for configurable CPU frequency.
258
259 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
260
261 If in doubt, say N.
262
Viresh Kumar7a998932013-04-04 12:54:21 +0000263config LOONGSON2_CPUFREQ
264 tristate "Loongson2 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000265 depends on LEMOTE_MACH2F
Viresh Kumar7a998932013-04-04 12:54:21 +0000266 help
267 This option adds a CPUFreq driver for loongson processors which
268 support software configurable cpu frequency.
269
270 Loongson2F and it's successors support this feature.
271
272 For details, take a look at <file:Documentation/cpu-freq/>.
273
274 If in doubt, say N.
275
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800276config LOONGSON1_CPUFREQ
277 tristate "Loongson1 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000278 depends on LOONGSON1_LS1B
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800279 help
280 This option adds a CPUFreq driver for loongson1 processors which
281 support software configurable cpu frequency.
282
283 For details, take a look at <file:Documentation/cpu-freq/>.
284
285 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530286endif
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800287
Viresh Kumarf41f4812014-11-15 08:50:44 +0530288if SPARC64
Viresh Kumar764295a2013-04-04 12:54:24 +0000289config SPARC_US3_CPUFREQ
290 tristate "UltraSPARC-III CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000291 help
292 This adds the CPUFreq driver for UltraSPARC-III processors.
293
294 For details, take a look at <file:Documentation/cpu-freq>.
295
296 If in doubt, say N.
297
298config SPARC_US2E_CPUFREQ
299 tristate "UltraSPARC-IIe CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000300 help
301 This adds the CPUFreq driver for UltraSPARC-IIe processors.
302
303 For details, take a look at <file:Documentation/cpu-freq>.
304
305 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530306endif
Viresh Kumar764295a2013-04-04 12:54:24 +0000307
Viresh Kumarf41f4812014-11-15 08:50:44 +0530308if SUPERH
Viresh Kumar72582672013-04-04 12:54:22 +0000309config SH_CPU_FREQ
310 tristate "SuperH CPU Frequency driver"
Viresh Kumar72582672013-04-04 12:54:22 +0000311 help
312 This adds the cpufreq driver for SuperH. Any CPU that supports
313 clock rate rounding through the clock framework can use this
314 driver. While it will make the kernel slightly larger, this is
315 harmless for CPUs that don't support rate rounding. The driver
316 will also generate a notice in the boot log before disabling
317 itself if the CPU in question is not capable of rate rounding.
318
319 For details, take a look at <file:Documentation/cpu-freq>.
320
321 If unsure, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530322endif
Viresh Kumar72582672013-04-04 12:54:22 +0000323
Tang Yuantian2f249352015-03-13 12:39:02 +0800324config QORIQ_CPUFREQ
325 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
Geert Uytterhoeven1f1755a2020-05-07 13:29:53 +0200326 depends on OF && COMMON_CLK
327 depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
Tang Yuantian2f249352015-03-13 12:39:02 +0800328 select CLK_QORIQ
329 help
330 This adds the CPUFreq driver support for Freescale QorIQ SoCs
331 which are capable of changing the CPU's frequency dynamically.
332
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400333endif
334endmenu