blob: c70ed51daa155db1d9cbe3c9cc6ce39195276893 [file] [log] [blame]
Dave Jonesbb0a56e2011-05-19 18:51:07 -04001menu "CPU Frequency scaling"
2
Linus Torvalds1da177e2005-04-16 15:20:36 -07003config CPU_FREQ
4 bool "CPU Frequency scaling"
Pranith Kumar83fe27e2014-12-05 11:24:45 -05005 select SRCU
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 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 <file:Documentation/cpu-freq>.
16
17 If in doubt, say N.
18
19if CPU_FREQ
20
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010021config CPU_FREQ_GOV_ATTR_SET
22 bool
23
Larry Finger1e15f292012-12-29 01:55:20 +000024config CPU_FREQ_GOV_COMMON
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010025 select CPU_FREQ_GOV_ATTR_SET
Rafael J. Wysockie6f03652016-02-28 02:33:29 +010026 select IRQ_WORK
Larry Finger1e15f292012-12-29 01:55:20 +000027 bool
28
Lukasz Majewski2fb47192013-12-20 15:24:51 +010029config CPU_FREQ_BOOST_SW
30 bool
31 depends on THERMAL
32
Linus Torvalds1da177e2005-04-16 15:20:36 -070033config CPU_FREQ_STAT
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020034 bool "CPU frequency transition statistics"
Mike Frysinger9101be52007-04-18 16:18:13 -040035 help
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020036 Export CPU frequency statistics information through sysfs.
Mike Frysinger9101be52007-04-18 16:18:13 -040037
38 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
40config CPU_FREQ_STAT_DETAILS
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020041 bool "CPU frequency transition statistics details"
Mike Frysinger9101be52007-04-18 16:18:13 -040042 depends on CPU_FREQ_STAT
43 help
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020044 Show detailed CPU frequency transition table in sysfs.
Mike Frysinger9101be52007-04-18 16:18:13 -040045
46 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
Connor O'Brien6e7b83d2018-01-31 18:11:57 -080048config CPU_FREQ_TIMES
49 bool "CPU frequency time-in-state statistics"
50 default y
51 help
52 This driver exports CPU time-in-state information through procfs file
53 system.
54
55 If in doubt, say N.
56
Linus Torvalds1da177e2005-04-16 15:20:36 -070057choice
58 prompt "Default CPUFreq governor"
Alexander Shiyan559f56c2013-05-05 12:18:08 +000059 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
Linus Torvalds1da177e2005-04-16 15:20:36 -070060 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
61 help
62 This option sets which CPUFreq governor shall be loaded at
63 startup. If in doubt, select 'performance'.
64
65config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
66 bool "performance"
67 select CPU_FREQ_GOV_PERFORMANCE
68 help
69 Use the CPUFreq governor 'performance' as default. This sets
70 the frequency statically to the highest frequency supported by
71 the CPU.
72
Alessandro Guido30d221d2008-04-18 13:31:13 -070073config CPU_FREQ_DEFAULT_GOV_POWERSAVE
74 bool "powersave"
Alessandro Guido30d221d2008-04-18 13:31:13 -070075 select CPU_FREQ_GOV_POWERSAVE
76 help
77 Use the CPUFreq governor 'powersave' as default. This sets
78 the frequency statically to the lowest frequency supported by
79 the CPU.
80
Linus Torvalds1da177e2005-04-16 15:20:36 -070081config CPU_FREQ_DEFAULT_GOV_USERSPACE
82 bool "userspace"
83 select CPU_FREQ_GOV_USERSPACE
84 help
85 Use the CPUFreq governor 'userspace' as default. This allows
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +010086 you to set the CPU frequency manually or when a userspace
Linus Torvalds1da177e2005-04-16 15:20:36 -070087 program shall be able to set the CPU dynamically without having
88 to enable the userspace governor manually.
89
Thomas Renninger1c256242007-10-02 13:28:12 -070090config CPU_FREQ_DEFAULT_GOV_ONDEMAND
91 bool "ondemand"
92 select CPU_FREQ_GOV_ONDEMAND
93 select CPU_FREQ_GOV_PERFORMANCE
94 help
95 Use the CPUFreq governor 'ondemand' as default. This allows
96 you to get a full dynamic frequency capable system by simply
97 loading your cpufreq low-level hardware driver.
98 Be aware that not all cpufreq drivers support the ondemand
99 governor. If unsure have a look at the help section of the
100 driver. Fallback governor will be the performance governor.
101
102config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
103 bool "conservative"
104 select CPU_FREQ_GOV_CONSERVATIVE
105 select CPU_FREQ_GOV_PERFORMANCE
106 help
107 Use the CPUFreq governor 'conservative' as default. This allows
108 you to get a full dynamic frequency capable system by simply
109 loading your cpufreq low-level hardware driver.
110 Be aware that not all cpufreq drivers support the conservative
111 governor. If unsure have a look at the help section of the
112 driver. Fallback governor will be the performance governor.
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200113
Viresh Kumarc33cc8f2016-05-17 14:41:22 +0530114config CPU_FREQ_DEFAULT_GOV_INTERACTIVE
115 bool "interactive"
116 select CPU_FREQ_GOV_INTERACTIVE
117 select CPU_FREQ_GOV_PERFORMANCE
118 help
119 Use the CPUFreq governor 'interactive' as default. This allows
120 you to get a full dynamic cpu frequency capable system by simply
121 loading your cpufreq low-level hardware driver, using the
122 'interactive' governor for latency-sensitive workloads.
123
Rafael J. Wysockib1d09762016-04-02 01:09:12 +0200124config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
125 bool "schedutil"
Arnd Bergmann5f6e85d2016-05-11 14:52:01 +0200126 depends on SMP
Rafael J. Wysockib1d09762016-04-02 01:09:12 +0200127 select CPU_FREQ_GOV_SCHEDUTIL
128 select CPU_FREQ_GOV_PERFORMANCE
129 help
130 Use the 'schedutil' CPUFreq governor by default. If unsure,
131 have a look at the help section of that governor. The fallback
132 governor will be 'performance'.
133
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134endchoice
135
136config CPU_FREQ_GOV_PERFORMANCE
Mike Frysinger9101be52007-04-18 16:18:13 -0400137 tristate "'performance' governor"
138 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 This cpufreq governor sets the frequency statically to the
140 highest available CPU frequency.
141
Mike Frysinger9101be52007-04-18 16:18:13 -0400142 To compile this driver as a module, choose M here: the
143 module will be called cpufreq_performance.
144
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145 If in doubt, say Y.
146
147config CPU_FREQ_GOV_POWERSAVE
Mike Frysinger9101be52007-04-18 16:18:13 -0400148 tristate "'powersave' governor"
149 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 This cpufreq governor sets the frequency statically to the
151 lowest available CPU frequency.
152
Mike Frysinger9101be52007-04-18 16:18:13 -0400153 To compile this driver as a module, choose M here: the
154 module will be called cpufreq_powersave.
155
Linus Torvalds1da177e2005-04-16 15:20:36 -0700156 If in doubt, say Y.
157
158config CPU_FREQ_GOV_USERSPACE
Mike Frysinger9101be52007-04-18 16:18:13 -0400159 tristate "'userspace' governor for userspace frequency scaling"
160 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 Enable this cpufreq governor when you either want to set the
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +0100162 CPU frequency manually or when a userspace program shall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700163 be able to set the CPU dynamically, like on LART
Erik Mouw4c412512006-04-03 14:21:00 +0200164 <http://www.lartmaker.nl/>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165
Mike Frysinger9101be52007-04-18 16:18:13 -0400166 To compile this driver as a module, choose M here: the
167 module will be called cpufreq_userspace.
168
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169 For details, take a look at <file:Documentation/cpu-freq/>.
170
171 If in doubt, say Y.
172
173config CPU_FREQ_GOV_ONDEMAND
174 tristate "'ondemand' cpufreq policy governor"
Larry Finger1e15f292012-12-29 01:55:20 +0000175 select CPU_FREQ_GOV_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700176 help
177 'ondemand' - This driver adds a dynamic cpufreq policy governor.
178 The governor does a periodic polling and
179 changes frequency based on the CPU utilization.
180 The support for this governor depends on CPU capability to
181 do fast frequency switching (i.e, very low latency frequency
182 transitions).
183
Mike Frysinger9101be52007-04-18 16:18:13 -0400184 To compile this driver as a module, choose M here: the
185 module will be called cpufreq_ondemand.
186
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187 For details, take a look at linux/Documentation/cpu-freq.
188
189 If in doubt, say N.
190
Dave Jonesb9170832005-05-31 19:03:47 -0700191config CPU_FREQ_GOV_CONSERVATIVE
192 tristate "'conservative' cpufreq governor"
193 depends on CPU_FREQ
Larry Finger1e15f292012-12-29 01:55:20 +0000194 select CPU_FREQ_GOV_COMMON
Dave Jonesb9170832005-05-31 19:03:47 -0700195 help
196 'conservative' - this driver is rather similar to the 'ondemand'
197 governor both in its source code and its purpose, the difference is
198 its optimisation for better suitability in a battery powered
199 environment. The frequency is gracefully increased and decreased
200 rather than jumping to 100% when speed is required.
201
202 If you have a desktop machine then you should really be considering
203 the 'ondemand' governor instead, however if you are using a laptop,
204 PDA or even an AMD64 based computer (due to the unacceptable
205 step-by-step latency issues between the minimum and maximum frequency
206 transitions in the CPU) you will probably want to use this governor.
207
Mike Frysinger9101be52007-04-18 16:18:13 -0400208 To compile this driver as a module, choose M here: the
209 module will be called cpufreq_conservative.
210
Dave Jonesb9170832005-05-31 19:03:47 -0700211 For details, take a look at linux/Documentation/cpu-freq.
212
213 If in doubt, say N.
214
Viresh Kumarc33cc8f2016-05-17 14:41:22 +0530215config CPU_FREQ_GOV_INTERACTIVE
216 tristate "'interactive' cpufreq policy governor"
217 depends on CPU_FREQ
218 select CPU_FREQ_GOV_ATTR_SET
219 select IRQ_WORK
220 help
221 'interactive' - This driver adds a dynamic cpufreq policy governor
222 designed for latency-sensitive workloads.
223
224 This governor attempts to reduce the latency of clock
225 increases so that the system is more responsive to
226 interactive workloads.
227
228 To compile this driver as a module, choose M here: the
229 module will be called cpufreq_interactive.
230
231 For details, take a look at linux/Documentation/cpu-freq.
232
233 If in doubt, say N.
234
Rafael J. Wysockib1d09762016-04-02 01:09:12 +0200235config CPU_FREQ_GOV_SCHEDUTIL
Rafael J. Wysockic4568722016-08-16 22:14:55 +0200236 bool "'schedutil' cpufreq policy governor"
Rafael J. Wysockidf12b012016-05-06 15:00:38 +0200237 depends on CPU_FREQ && SMP
Rafael J. Wysockib1d09762016-04-02 01:09:12 +0200238 select CPU_FREQ_GOV_ATTR_SET
239 select IRQ_WORK
240 help
241 This governor makes decisions based on the utilization data provided
242 by the scheduler. It sets the CPU frequency to be proportional to
243 the utilization/capacity ratio coming from the scheduler. If the
244 utilization is frequency-invariant, the new frequency is also
245 proportional to the maximum available frequency. If that is not the
246 case, it is proportional to the current frequency of the CPU. The
247 frequency tipping point is at utilization/capacity equal to 80% in
248 both cases.
249
Rafael J. Wysockib1d09762016-04-02 01:09:12 +0200250 If in doubt, say N.
251
Viresh Kumarf41f4812014-11-15 08:50:44 +0530252comment "CPU frequency scaling drivers"
253
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530254config CPUFREQ_DT
255 tristate "Generic DT based cpufreq driver"
Viresh Kumar5fbfbcd2014-06-10 10:39:46 +0530256 depends on HAVE_CLK && OF
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530257 # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y:
Arnd Bergmann217886d2014-06-13 10:40:32 +0200258 depends on !CPU_THERMAL || THERMAL
Viresh Kumarf56aad12016-03-30 13:45:26 +0530259 select CPUFREQ_DT_PLATDEV
Mark Brown109df082013-12-11 22:12:27 +0000260 select PM_OPP
Shawn Guo95ceafd2012-09-06 07:09:11 +0000261 help
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530262 This adds a generic DT based cpufreq driver for frequency management.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000263 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
Viresh Kumar33cc4fc2016-09-09 16:48:07 +0530264 systems.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000265
266 If in doubt, say N.
267
Viresh Kumarf56aad12016-03-30 13:45:26 +0530268config CPUFREQ_DT_PLATDEV
269 bool
270 help
271 This adds a generic DT based cpufreq platdev driver for frequency
272 management. This creates a 'cpufreq-dt' platform device, on the
273 supported platforms.
274
275 If in doubt, say N.
276
Viresh Kumarf41f4812014-11-15 08:50:44 +0530277if X86
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400278source "drivers/cpufreq/Kconfig.x86"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530279endif
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400280
Viresh Kumarf41f4812014-11-15 08:50:44 +0530281if ARM || ARM64
Kukjin Kimf7d77072011-06-01 14:18:22 -0700282source "drivers/cpufreq/Kconfig.arm"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530283endif
Kukjin Kimf7d77072011-06-01 14:18:22 -0700284
Viresh Kumarf41f4812014-11-15 08:50:44 +0530285if PPC32 || PPC64
286source "drivers/cpufreq/Kconfig.powerpc"
287endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000288
Viresh Kumarf41f4812014-11-15 08:50:44 +0530289if AVR32
Viresh Kumar81c720c2013-04-04 12:54:17 +0000290config AVR32_AT32AP_CPUFREQ
291 bool "CPU frequency driver for AT32AP"
292 depends on PLATFORM_AT32AP
293 default n
294 help
295 This enables the CPU frequency driver for AT32AP processors.
296 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530297endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000298
Viresh Kumarf41f4812014-11-15 08:50:44 +0530299if IA64
Viresh Kumarab423e42013-04-04 12:54:20 +0000300config IA64_ACPI_CPUFREQ
301 tristate "ACPI Processor P-States driver"
Viresh Kumarab423e42013-04-04 12:54:20 +0000302 depends on ACPI_PROCESSOR
303 help
304 This driver adds a CPUFreq driver which utilizes the ACPI
305 Processor Performance States.
306
307 For details, take a look at <file:Documentation/cpu-freq/>.
308
309 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530310endif
Viresh Kumarab423e42013-04-04 12:54:20 +0000311
Viresh Kumarf41f4812014-11-15 08:50:44 +0530312if MIPS
Viresh Kumar7a998932013-04-04 12:54:21 +0000313config LOONGSON2_CPUFREQ
314 tristate "Loongson2 CPUFreq Driver"
James Hogan64369812017-11-15 21:17:55 +0000315 depends on LEMOTE_MACH2F
Viresh Kumar7a998932013-04-04 12:54:21 +0000316 help
317 This option adds a CPUFreq driver for loongson processors which
318 support software configurable cpu frequency.
319
320 Loongson2F and it's successors support this feature.
321
322 For details, take a look at <file:Documentation/cpu-freq/>.
323
324 If in doubt, say N.
325
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800326config LOONGSON1_CPUFREQ
327 tristate "Loongson1 CPUFreq Driver"
James Hogan64369812017-11-15 21:17:55 +0000328 depends on LOONGSON1_LS1B
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800329 help
330 This option adds a CPUFreq driver for loongson1 processors which
331 support software configurable cpu frequency.
332
333 For details, take a look at <file:Documentation/cpu-freq/>.
334
335 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530336endif
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800337
Viresh Kumarf41f4812014-11-15 08:50:44 +0530338if SPARC64
Viresh Kumar764295a2013-04-04 12:54:24 +0000339config SPARC_US3_CPUFREQ
340 tristate "UltraSPARC-III CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000341 help
342 This adds the CPUFreq driver for UltraSPARC-III processors.
343
344 For details, take a look at <file:Documentation/cpu-freq>.
345
346 If in doubt, say N.
347
348config SPARC_US2E_CPUFREQ
349 tristate "UltraSPARC-IIe CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000350 help
351 This adds the CPUFreq driver for UltraSPARC-IIe processors.
352
353 For details, take a look at <file:Documentation/cpu-freq>.
354
355 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530356endif
Viresh Kumar764295a2013-04-04 12:54:24 +0000357
Viresh Kumarf41f4812014-11-15 08:50:44 +0530358if SUPERH
Viresh Kumar72582672013-04-04 12:54:22 +0000359config SH_CPU_FREQ
360 tristate "SuperH CPU Frequency driver"
Viresh Kumar72582672013-04-04 12:54:22 +0000361 help
362 This adds the cpufreq driver for SuperH. Any CPU that supports
363 clock rate rounding through the clock framework can use this
364 driver. While it will make the kernel slightly larger, this is
365 harmless for CPUs that don't support rate rounding. The driver
366 will also generate a notice in the boot log before disabling
367 itself if the CPU in question is not capable of rate rounding.
368
369 For details, take a look at <file:Documentation/cpu-freq>.
370
371 If unsure, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530372endif
Viresh Kumar72582672013-04-04 12:54:22 +0000373
Tang Yuantian2f249352015-03-13 12:39:02 +0800374config QORIQ_CPUFREQ
375 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
376 depends on OF && COMMON_CLK && (PPC_E500MC || ARM)
Arnd Bergmannddd30ef2016-02-29 17:04:20 +0100377 depends on !CPU_THERMAL || THERMAL
Tang Yuantian2f249352015-03-13 12:39:02 +0800378 select CLK_QORIQ
379 help
380 This adds the CPUFreq driver support for Freescale QorIQ SoCs
381 which are capable of changing the CPU's frequency dynamically.
382
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400383endif
384endmenu