Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 menu "CPU Frequency scaling"
0003 
0004 config CPU_FREQ
0005         bool "CPU Frequency scaling"
0006         select SRCU
0007         help
0008           CPU Frequency scaling allows you to change the clock speed of 
0009           CPUs on the fly. This is a nice method to save power, because 
0010           the lower the CPU clock speed, the less power the CPU consumes.
0011 
0012           Note that this driver doesn't automatically change the CPU
0013           clock speed, you need to either enable a dynamic cpufreq governor
0014           (see below) after boot, or use a userspace tool.
0015 
0016           For details, take a look at
0017           <file:Documentation/admin-guide/pm/cpufreq.rst>.
0018 
0019           If in doubt, say N.
0020 
0021 if CPU_FREQ
0022 
0023 config CPU_FREQ_GOV_ATTR_SET
0024         bool
0025 
0026 config CPU_FREQ_GOV_COMMON
0027         select CPU_FREQ_GOV_ATTR_SET
0028         select IRQ_WORK
0029         bool
0030 
0031 config CPU_FREQ_STAT
0032         bool "CPU frequency transition statistics"
0033         help
0034           Export CPU frequency statistics information through sysfs.
0035 
0036           If in doubt, say N.
0037 
0038 choice
0039         prompt "Default CPUFreq governor"
0040         default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
0041         default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
0042         default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
0043         default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
0044         help
0045           This option sets which CPUFreq governor shall be loaded at
0046           startup. If in doubt, use the default setting.
0047 
0048 config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
0049         bool "performance"
0050         select CPU_FREQ_GOV_PERFORMANCE
0051         help
0052           Use the CPUFreq governor 'performance' as default. This sets
0053           the frequency statically to the highest frequency supported by
0054           the CPU.
0055 
0056 config CPU_FREQ_DEFAULT_GOV_POWERSAVE
0057         bool "powersave"
0058         select CPU_FREQ_GOV_POWERSAVE
0059         help
0060           Use the CPUFreq governor 'powersave' as default. This sets
0061           the frequency statically to the lowest frequency supported by
0062           the CPU.
0063 
0064 config CPU_FREQ_DEFAULT_GOV_USERSPACE
0065         bool "userspace"
0066         select CPU_FREQ_GOV_USERSPACE
0067         help
0068           Use the CPUFreq governor 'userspace' as default. This allows
0069           you to set the CPU frequency manually or when a userspace 
0070           program shall be able to set the CPU dynamically without having
0071           to enable the userspace governor manually.
0072 
0073 config CPU_FREQ_DEFAULT_GOV_ONDEMAND
0074         bool "ondemand"
0075         depends on !(X86_INTEL_PSTATE && SMP)
0076         select CPU_FREQ_GOV_ONDEMAND
0077         select CPU_FREQ_GOV_PERFORMANCE
0078         help
0079           Use the CPUFreq governor 'ondemand' as default. This allows
0080           you to get a full dynamic frequency capable system by simply
0081           loading your cpufreq low-level hardware driver.
0082           Be aware that not all cpufreq drivers support the ondemand
0083           governor. If unsure have a look at the help section of the
0084           driver. Fallback governor will be the performance governor.
0085 
0086 config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
0087         bool "conservative"
0088         depends on !(X86_INTEL_PSTATE && SMP)
0089         select CPU_FREQ_GOV_CONSERVATIVE
0090         select CPU_FREQ_GOV_PERFORMANCE
0091         help
0092           Use the CPUFreq governor 'conservative' as default. This allows
0093           you to get a full dynamic frequency capable system by simply
0094           loading your cpufreq low-level hardware driver.
0095           Be aware that not all cpufreq drivers support the conservative
0096           governor. If unsure have a look at the help section of the
0097           driver. Fallback governor will be the performance governor.
0098 
0099 config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
0100         bool "schedutil"
0101         depends on SMP
0102         select CPU_FREQ_GOV_SCHEDUTIL
0103         select CPU_FREQ_GOV_PERFORMANCE
0104         help
0105           Use the 'schedutil' CPUFreq governor by default. If unsure,
0106           have a look at the help section of that governor. The fallback
0107           governor will be 'performance'.
0108 
0109 endchoice
0110 
0111 config CPU_FREQ_GOV_PERFORMANCE
0112         tristate "'performance' governor"
0113         help
0114           This cpufreq governor sets the frequency statically to the
0115           highest available CPU frequency.
0116 
0117           To compile this driver as a module, choose M here: the
0118           module will be called cpufreq_performance.
0119 
0120           If in doubt, say Y.
0121 
0122 config CPU_FREQ_GOV_POWERSAVE
0123         tristate "'powersave' governor"
0124         help
0125           This cpufreq governor sets the frequency statically to the
0126           lowest available CPU frequency.
0127 
0128           To compile this driver as a module, choose M here: the
0129           module will be called cpufreq_powersave.
0130 
0131           If in doubt, say Y.
0132 
0133 config CPU_FREQ_GOV_USERSPACE
0134         tristate "'userspace' governor for userspace frequency scaling"
0135         help
0136           Enable this cpufreq governor when you either want to set the
0137           CPU frequency manually or when a userspace program shall
0138           be able to set the CPU dynamically, like on LART 
0139           <http://www.lartmaker.nl/>.
0140 
0141           To compile this driver as a module, choose M here: the
0142           module will be called cpufreq_userspace.
0143 
0144           If in doubt, say Y.
0145 
0146 config CPU_FREQ_GOV_ONDEMAND
0147         tristate "'ondemand' cpufreq policy governor"
0148         select CPU_FREQ_GOV_COMMON
0149         help
0150           'ondemand' - This driver adds a dynamic cpufreq policy governor.
0151           The governor does a periodic polling and 
0152           changes frequency based on the CPU utilization.
0153           The support for this governor depends on CPU capability to
0154           do fast frequency switching (i.e, very low latency frequency
0155           transitions). 
0156 
0157           To compile this driver as a module, choose M here: the
0158           module will be called cpufreq_ondemand.
0159 
0160           For details, take a look at
0161           <file:Documentation/admin-guide/pm/cpufreq.rst>.
0162 
0163           If in doubt, say N.
0164 
0165 config CPU_FREQ_GOV_CONSERVATIVE
0166         tristate "'conservative' cpufreq governor"
0167         depends on CPU_FREQ
0168         select CPU_FREQ_GOV_COMMON
0169         help
0170           'conservative' - this driver is rather similar to the 'ondemand'
0171           governor both in its source code and its purpose, the difference is
0172           its optimisation for better suitability in a battery powered
0173           environment.  The frequency is gracefully increased and decreased
0174           rather than jumping to 100% when speed is required.
0175 
0176           If you have a desktop machine then you should really be considering
0177           the 'ondemand' governor instead, however if you are using a laptop,
0178           PDA or even an AMD64 based computer (due to the unacceptable
0179           step-by-step latency issues between the minimum and maximum frequency
0180           transitions in the CPU) you will probably want to use this governor.
0181 
0182           To compile this driver as a module, choose M here: the
0183           module will be called cpufreq_conservative.
0184 
0185           For details, take a look at
0186           <file:Documentation/admin-guide/pm/cpufreq.rst>.
0187 
0188           If in doubt, say N.
0189 
0190 config CPU_FREQ_GOV_SCHEDUTIL
0191         bool "'schedutil' cpufreq policy governor"
0192         depends on CPU_FREQ && SMP
0193         select CPU_FREQ_GOV_ATTR_SET
0194         select IRQ_WORK
0195         help
0196           This governor makes decisions based on the utilization data provided
0197           by the scheduler.  It sets the CPU frequency to be proportional to
0198           the utilization/capacity ratio coming from the scheduler.  If the
0199           utilization is frequency-invariant, the new frequency is also
0200           proportional to the maximum available frequency.  If that is not the
0201           case, it is proportional to the current frequency of the CPU.  The
0202           frequency tipping point is at utilization/capacity equal to 80% in
0203           both cases.
0204 
0205           If in doubt, say N.
0206 
0207 comment "CPU frequency scaling drivers"
0208 
0209 config CPUFREQ_DT
0210         tristate "Generic DT based cpufreq driver"
0211         depends on HAVE_CLK && OF
0212         select CPUFREQ_DT_PLATDEV
0213         select PM_OPP
0214         help
0215           This adds a generic DT based cpufreq driver for frequency management.
0216           It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
0217           systems.
0218 
0219           If in doubt, say N.
0220 
0221 config CPUFREQ_DT_PLATDEV
0222         bool
0223         help
0224           This adds a generic DT based cpufreq platdev driver for frequency
0225           management.  This creates a 'cpufreq-dt' platform device, on the
0226           supported platforms.
0227 
0228           If in doubt, say N.
0229 
0230 if X86
0231 source "drivers/cpufreq/Kconfig.x86"
0232 endif
0233 
0234 if ARM || ARM64
0235 source "drivers/cpufreq/Kconfig.arm"
0236 endif
0237 
0238 if PPC32 || PPC64
0239 source "drivers/cpufreq/Kconfig.powerpc"
0240 endif
0241 
0242 if IA64
0243 config IA64_ACPI_CPUFREQ
0244         tristate "ACPI Processor P-States driver"
0245         depends on ACPI_PROCESSOR
0246         help
0247         This driver adds a CPUFreq driver which utilizes the ACPI
0248         Processor Performance States.
0249 
0250         If in doubt, say N.
0251 endif
0252 
0253 if MIPS
0254 config BMIPS_CPUFREQ
0255         tristate "BMIPS CPUfreq Driver"
0256         help
0257           This option adds a CPUfreq driver for BMIPS processors with
0258           support for configurable CPU frequency.
0259 
0260           For now, BMIPS5 chips are supported (such as the Broadcom 7425).
0261 
0262           If in doubt, say N.
0263 
0264 config LOONGSON2_CPUFREQ
0265         tristate "Loongson2 CPUFreq Driver"
0266         depends on LEMOTE_MACH2F
0267         help
0268           This option adds a CPUFreq driver for loongson processors which
0269           support software configurable cpu frequency.
0270 
0271           Loongson2F and its successors support this feature.
0272 
0273           If in doubt, say N.
0274 
0275 config LOONGSON1_CPUFREQ
0276         tristate "Loongson1 CPUFreq Driver"
0277         depends on LOONGSON1_LS1B
0278         help
0279           This option adds a CPUFreq driver for loongson1 processors which
0280           support software configurable cpu frequency.
0281 
0282           If in doubt, say N.
0283 endif
0284 
0285 if SPARC64
0286 config SPARC_US3_CPUFREQ
0287         tristate "UltraSPARC-III CPU Frequency driver"
0288         help
0289           This adds the CPUFreq driver for UltraSPARC-III processors.
0290 
0291           If in doubt, say N.
0292 
0293 config SPARC_US2E_CPUFREQ
0294         tristate "UltraSPARC-IIe CPU Frequency driver"
0295         help
0296           This adds the CPUFreq driver for UltraSPARC-IIe processors.
0297 
0298           If in doubt, say N.
0299 endif
0300 
0301 if SUPERH
0302 config SH_CPU_FREQ
0303         tristate "SuperH CPU Frequency driver"
0304         help
0305           This adds the cpufreq driver for SuperH. Any CPU that supports
0306           clock rate rounding through the clock framework can use this
0307           driver. While it will make the kernel slightly larger, this is
0308           harmless for CPUs that don't support rate rounding. The driver
0309           will also generate a notice in the boot log before disabling
0310           itself if the CPU in question is not capable of rate rounding.
0311 
0312           If unsure, say N.
0313 endif
0314 
0315 config QORIQ_CPUFREQ
0316         tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
0317         depends on OF && COMMON_CLK
0318         depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
0319         select CLK_QORIQ
0320         help
0321           This adds the CPUFreq driver support for Freescale QorIQ SoCs
0322           which are capable of changing the CPU's frequency dynamically.
0323 
0324 endif
0325 endmenu