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