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