blob: c3038cdc6865002a8cddbac49e64cd1a586ef5a5 [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
Alexander Monakov733dda92021-04-20 00:57:07 +030016 For details, take a look at
17 <file:Documentation/admin-guide/pm/cpufreq.rst>.
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
19 If in doubt, say N.
20
21if CPU_FREQ
22
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010023config CPU_FREQ_GOV_ATTR_SET
24 bool
25
Larry Finger1e15f292012-12-29 01:55:20 +000026config CPU_FREQ_GOV_COMMON
Rafael J. Wysocki2d0c58a2016-03-22 02:49:15 +010027 select CPU_FREQ_GOV_ATTR_SET
Rafael J. Wysockie6f03652016-02-28 02:33:29 +010028 select IRQ_WORK
Larry Finger1e15f292012-12-29 01:55:20 +000029 bool
30
Linus Torvalds1da177e2005-04-16 15:20:36 -070031config CPU_FREQ_STAT
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020032 bool "CPU frequency transition statistics"
Mike Frysinger9101be52007-04-18 16:18:13 -040033 help
Rafael J. Wysocki1aefc752016-05-31 22:14:44 +020034 Export CPU frequency statistics information through sysfs.
Mike Frysinger9101be52007-04-18 16:18:13 -040035
36 If in doubt, say N.
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Linus Torvalds1da177e2005-04-16 15:20:36 -070038choice
39 prompt "Default CPUFreq governor"
Alexander Shiyan559f56c2013-05-05 12:18:08 +000040 default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
Valentin Schneiderf259eab2020-07-22 10:37:32 +010041 default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
Rafael J. Wysockia00ec382020-03-26 20:24:35 +010042 default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
44 help
45 This option sets which CPUFreq governor shall be loaded at
Rafael J. Wysockia00ec382020-03-26 20:24:35 +010046 startup. If in doubt, use the default setting.
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
48config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
49 bool "performance"
50 select CPU_FREQ_GOV_PERFORMANCE
51 help
52 Use the CPUFreq governor 'performance' as default. This sets
53 the frequency statically to the highest frequency supported by
54 the CPU.
55
Alessandro Guido30d221d2008-04-18 13:31:13 -070056config CPU_FREQ_DEFAULT_GOV_POWERSAVE
57 bool "powersave"
Alessandro Guido30d221d2008-04-18 13:31:13 -070058 select CPU_FREQ_GOV_POWERSAVE
59 help
60 Use the CPUFreq governor 'powersave' as default. This sets
61 the frequency statically to the lowest frequency supported by
62 the CPU.
63
Linus Torvalds1da177e2005-04-16 15:20:36 -070064config CPU_FREQ_DEFAULT_GOV_USERSPACE
65 bool "userspace"
66 select CPU_FREQ_GOV_USERSPACE
67 help
68 Use the CPUFreq governor 'userspace' as default. This allows
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +010069 you to set the CPU frequency manually or when a userspace
Linus Torvalds1da177e2005-04-16 15:20:36 -070070 program shall be able to set the CPU dynamically without having
71 to enable the userspace governor manually.
72
Thomas Renninger1c256242007-10-02 13:28:12 -070073config CPU_FREQ_DEFAULT_GOV_ONDEMAND
74 bool "ondemand"
Rafael J. Wysockidb865272020-10-23 17:15:56 +020075 depends on !(X86_INTEL_PSTATE && SMP)
Thomas Renninger1c256242007-10-02 13:28:12 -070076 select CPU_FREQ_GOV_ONDEMAND
77 select CPU_FREQ_GOV_PERFORMANCE
78 help
79 Use the CPUFreq governor 'ondemand' as default. This allows
80 you to get a full dynamic frequency capable system by simply
81 loading your cpufreq low-level hardware driver.
82 Be aware that not all cpufreq drivers support the ondemand
83 governor. If unsure have a look at the help section of the
84 driver. Fallback governor will be the performance governor.
85
86config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
87 bool "conservative"
Rafael J. Wysockidb865272020-10-23 17:15:56 +020088 depends on !(X86_INTEL_PSTATE && SMP)
Thomas Renninger1c256242007-10-02 13:28:12 -070089 select CPU_FREQ_GOV_CONSERVATIVE
90 select CPU_FREQ_GOV_PERFORMANCE
91 help
92 Use the CPUFreq governor 'conservative' as default. This allows
93 you to get a full dynamic frequency capable system by simply
94 loading your cpufreq low-level hardware driver.
95 Be aware that not all cpufreq drivers support the conservative
96 governor. If unsure have a look at the help section of the
97 driver. Fallback governor will be the performance governor.
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +020098
99config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
100 bool "schedutil"
Arnd Bergmanncfe94922016-05-11 14:52:01 +0200101 depends on SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200102 select CPU_FREQ_GOV_SCHEDUTIL
103 select CPU_FREQ_GOV_PERFORMANCE
104 help
105 Use the 'schedutil' CPUFreq governor by default. If unsure,
106 have a look at the help section of that governor. The fallback
107 governor will be 'performance'.
108
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109endchoice
110
111config CPU_FREQ_GOV_PERFORMANCE
Mike Frysinger9101be52007-04-18 16:18:13 -0400112 tristate "'performance' governor"
113 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114 This cpufreq governor sets the frequency statically to the
115 highest available CPU frequency.
116
Mike Frysinger9101be52007-04-18 16:18:13 -0400117 To compile this driver as a module, choose M here: the
118 module will be called cpufreq_performance.
119
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120 If in doubt, say Y.
121
122config CPU_FREQ_GOV_POWERSAVE
Mike Frysinger9101be52007-04-18 16:18:13 -0400123 tristate "'powersave' governor"
124 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 This cpufreq governor sets the frequency statically to the
126 lowest available CPU frequency.
127
Mike Frysinger9101be52007-04-18 16:18:13 -0400128 To compile this driver as a module, choose M here: the
129 module will be called cpufreq_powersave.
130
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 If in doubt, say Y.
132
133config CPU_FREQ_GOV_USERSPACE
Mike Frysinger9101be52007-04-18 16:18:13 -0400134 tristate "'userspace' governor for userspace frequency scaling"
135 help
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136 Enable this cpufreq governor when you either want to set the
Frederik Schwarzer0211a9c2008-12-29 22:14:56 +0100137 CPU frequency manually or when a userspace program shall
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138 be able to set the CPU dynamically, like on LART
Erik Mouw4c412512006-04-03 14:21:00 +0200139 <http://www.lartmaker.nl/>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700140
Mike Frysinger9101be52007-04-18 16:18:13 -0400141 To compile this driver as a module, choose M here: the
142 module will be called cpufreq_userspace.
143
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144 If in doubt, say Y.
145
146config CPU_FREQ_GOV_ONDEMAND
147 tristate "'ondemand' cpufreq policy governor"
Larry Finger1e15f292012-12-29 01:55:20 +0000148 select CPU_FREQ_GOV_COMMON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149 help
150 'ondemand' - This driver adds a dynamic cpufreq policy governor.
151 The governor does a periodic polling and
152 changes frequency based on the CPU utilization.
153 The support for this governor depends on CPU capability to
154 do fast frequency switching (i.e, very low latency frequency
155 transitions).
156
Mike Frysinger9101be52007-04-18 16:18:13 -0400157 To compile this driver as a module, choose M here: the
158 module will be called cpufreq_ondemand.
159
Alexander Monakov733dda92021-04-20 00:57:07 +0300160 For details, take a look at
161 <file:Documentation/admin-guide/pm/cpufreq.rst>.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162
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
Alexander Monakov733dda92021-04-20 00:57:07 +0300185 For details, take a look at
186 <file:Documentation/admin-guide/pm/cpufreq.rst>.
Dave Jonesb9170832005-05-31 19:03:47 -0700187
188 If in doubt, say N.
189
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200190config CPU_FREQ_GOV_SCHEDUTIL
Rafael J. Wysocki58919e82016-08-16 22:14:55 +0200191 bool "'schedutil' cpufreq policy governor"
Rafael J. Wysockibf7cdff2016-05-06 15:00:38 +0200192 depends on CPU_FREQ && SMP
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200193 select CPU_FREQ_GOV_ATTR_SET
194 select IRQ_WORK
195 help
196 This governor makes decisions based on the utilization data provided
197 by the scheduler. It sets the CPU frequency to be proportional to
198 the utilization/capacity ratio coming from the scheduler. If the
199 utilization is frequency-invariant, the new frequency is also
200 proportional to the maximum available frequency. If that is not the
201 case, it is proportional to the current frequency of the CPU. The
202 frequency tipping point is at utilization/capacity equal to 80% in
203 both cases.
204
Rafael J. Wysocki9bdcb442016-04-02 01:09:12 +0200205 If in doubt, say N.
206
Viresh Kumarf41f4812014-11-15 08:50:44 +0530207comment "CPU frequency scaling drivers"
208
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530209config CPUFREQ_DT
210 tristate "Generic DT based cpufreq driver"
Viresh Kumar5fbfbcd2014-06-10 10:39:46 +0530211 depends on HAVE_CLK && OF
Viresh Kumarf56aad12016-03-30 13:45:26 +0530212 select CPUFREQ_DT_PLATDEV
Mark Brown109df082013-12-11 22:12:27 +0000213 select PM_OPP
Shawn Guo95ceafd2012-09-06 07:09:11 +0000214 help
Viresh Kumarbbcf0712014-09-09 19:58:03 +0530215 This adds a generic DT based cpufreq driver for frequency management.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000216 It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
Viresh Kumar33cc4fc2016-09-09 16:48:07 +0530217 systems.
Shawn Guo95ceafd2012-09-06 07:09:11 +0000218
219 If in doubt, say N.
220
Viresh Kumarf56aad12016-03-30 13:45:26 +0530221config CPUFREQ_DT_PLATDEV
222 bool
223 help
224 This adds a generic DT based cpufreq platdev driver for frequency
225 management. This creates a 'cpufreq-dt' platform device, on the
226 supported platforms.
227
228 If in doubt, say N.
229
Viresh Kumarf41f4812014-11-15 08:50:44 +0530230if X86
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400231source "drivers/cpufreq/Kconfig.x86"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530232endif
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400233
Viresh Kumarf41f4812014-11-15 08:50:44 +0530234if ARM || ARM64
Kukjin Kimf7d77072011-06-01 14:18:22 -0700235source "drivers/cpufreq/Kconfig.arm"
Viresh Kumarf41f4812014-11-15 08:50:44 +0530236endif
Kukjin Kimf7d77072011-06-01 14:18:22 -0700237
Viresh Kumarf41f4812014-11-15 08:50:44 +0530238if PPC32 || PPC64
239source "drivers/cpufreq/Kconfig.powerpc"
240endif
Viresh Kumar81c720c2013-04-04 12:54:17 +0000241
Viresh Kumarf41f4812014-11-15 08:50:44 +0530242if IA64
Viresh Kumarab423e42013-04-04 12:54:20 +0000243config IA64_ACPI_CPUFREQ
244 tristate "ACPI Processor P-States driver"
Viresh Kumarab423e42013-04-04 12:54:20 +0000245 depends on ACPI_PROCESSOR
246 help
247 This driver adds a CPUFreq driver which utilizes the ACPI
248 Processor Performance States.
249
Viresh Kumarab423e42013-04-04 12:54:20 +0000250 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530251endif
Viresh Kumarab423e42013-04-04 12:54:20 +0000252
Viresh Kumarf41f4812014-11-15 08:50:44 +0530253if MIPS
Markus Mayercdb56cb2017-02-07 13:58:55 -0800254config BMIPS_CPUFREQ
255 tristate "BMIPS CPUfreq Driver"
256 help
257 This option adds a CPUfreq driver for BMIPS processors with
258 support for configurable CPU frequency.
259
260 For now, BMIPS5 chips are supported (such as the Broadcom 7425).
261
262 If in doubt, say N.
263
Viresh Kumar7a998932013-04-04 12:54:21 +0000264config LOONGSON2_CPUFREQ
265 tristate "Loongson2 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000266 depends on LEMOTE_MACH2F
Viresh Kumar7a998932013-04-04 12:54:21 +0000267 help
268 This option adds a CPUFreq driver for loongson processors which
269 support software configurable cpu frequency.
270
271 Loongson2F and it's successors support this feature.
272
Viresh Kumar7a998932013-04-04 12:54:21 +0000273 If in doubt, say N.
274
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800275config LOONGSON1_CPUFREQ
276 tristate "Loongson1 CPUFreq Driver"
James Hogan0d307932017-11-15 21:17:55 +0000277 depends on LOONGSON1_LS1B
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800278 help
279 This option adds a CPUFreq driver for loongson1 processors which
280 support software configurable cpu frequency.
281
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800282 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530283endif
Kelvin Cheunga0a22cf2014-10-17 18:23:31 +0800284
Viresh Kumarf41f4812014-11-15 08:50:44 +0530285if SPARC64
Viresh Kumar764295a2013-04-04 12:54:24 +0000286config SPARC_US3_CPUFREQ
287 tristate "UltraSPARC-III CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000288 help
289 This adds the CPUFreq driver for UltraSPARC-III processors.
290
Viresh Kumar764295a2013-04-04 12:54:24 +0000291 If in doubt, say N.
292
293config SPARC_US2E_CPUFREQ
294 tristate "UltraSPARC-IIe CPU Frequency driver"
Viresh Kumar764295a2013-04-04 12:54:24 +0000295 help
296 This adds the CPUFreq driver for UltraSPARC-IIe processors.
297
Viresh Kumar764295a2013-04-04 12:54:24 +0000298 If in doubt, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530299endif
Viresh Kumar764295a2013-04-04 12:54:24 +0000300
Viresh Kumarf41f4812014-11-15 08:50:44 +0530301if SUPERH
Viresh Kumar72582672013-04-04 12:54:22 +0000302config SH_CPU_FREQ
303 tristate "SuperH CPU Frequency driver"
Viresh Kumar72582672013-04-04 12:54:22 +0000304 help
305 This adds the cpufreq driver for SuperH. Any CPU that supports
306 clock rate rounding through the clock framework can use this
307 driver. While it will make the kernel slightly larger, this is
308 harmless for CPUs that don't support rate rounding. The driver
309 will also generate a notice in the boot log before disabling
310 itself if the CPU in question is not capable of rate rounding.
311
Viresh Kumar72582672013-04-04 12:54:22 +0000312 If unsure, say N.
Viresh Kumarf41f4812014-11-15 08:50:44 +0530313endif
Viresh Kumar72582672013-04-04 12:54:22 +0000314
Tang Yuantian2f249352015-03-13 12:39:02 +0800315config QORIQ_CPUFREQ
316 tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
Geert Uytterhoeven1f1755a2020-05-07 13:29:53 +0200317 depends on OF && COMMON_CLK
318 depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
Tang Yuantian2f249352015-03-13 12:39:02 +0800319 select CLK_QORIQ
320 help
321 This adds the CPUFreq driver support for Freescale QorIQ SoCs
322 which are capable of changing the CPU's frequency dynamically.
323
Dave Jonesbb0a56e2011-05-19 18:51:07 -0400324endif
325endmenu