cpufreq: Add the "cpufreq.off=1" cmdline option
authorLen Brown <len.brown@intel.com>
Tue, 28 Feb 2017 21:44:16 +0000 (16:44 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 5 Mar 2017 23:05:31 +0000 (00:05 +0100)
Add the "cpufreq.off=1" cmdline option.

At boot-time, this allows a user to request CONFIG_CPU_FREQ=n
behavior from a kernel built with CONFIG_CPU_FREQ=y.

This is analogous to the existing "cpuidle.off=1" option
and CONFIG_CPU_IDLE=y

This capability is valuable when we need to debug end-user
issues in the BIOS or in Linux.  It is also convenient
for enabling comparisons, which may otherwise require a new kernel,
or help from BIOS SETUP, which may be buggy or unavailable.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/admin-guide/kernel-parameters.txt
drivers/cpufreq/cpufreq.c

index be7c0d9506b12072219f0396ceb9072eeea03df8..3988d2311f9707c48b4f3dca5df1c333ef0972cf 100644 (file)
        cpuidle.off=1   [CPU_IDLE]
                        disable the cpuidle sub-system
 
+       cpufreq.off=1   [CPU_FREQ]
+                       disable the cpufreq sub-system
+
        cpu_init_udelay=N
                        [X86] Delay for N microsec between assert and de-assert
                        of APIC INIT to start processors.  This delay occurs
index 80a785ad17e81c97ffb0a79b51b16c9758888e22..7790db2645d7cae6d7b5f762efc9dc42d3ba45dd 100644 (file)
@@ -2532,4 +2532,5 @@ static int __init cpufreq_core_init(void)
 
        return 0;
 }
+module_param(off, int, 0444);
 core_initcall(cpufreq_core_init);