]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cpufreq: intel_pstate: Do not expose PID parameters in passive mode
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Dec 2016 23:29:56 +0000 (00:29 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Dec 2016 02:30:11 +0000 (03:30 +0100)
If intel_pstate works in the passive mode in which it acts as
a regular cpufreq driver and collaborates with generic cpufreq
governors, the PID parameters are not used, so do not expose
them via debugfs in that case.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c

index 7cd0177ddeaf1cda249b1274d3eea91854614865..0d01cb2dc6d2ffbac592457449d520f743ce7ae0 100644 (file)
@@ -964,10 +964,6 @@ static void __init intel_pstate_debug_expose_params(void)
        struct dentry *debugfs_parent;
        int i = 0;
 
-       if (hwp_active ||
-           pstate_funcs.get_target_pstate == get_target_pstate_use_cpu_load)
-               return;
-
        debugfs_parent = debugfs_create_dir("pstate_snb", NULL);
        if (IS_ERR_OR_NULL(debugfs_parent))
                return;
@@ -2433,7 +2429,10 @@ static int __init intel_pstate_init(void)
        if (rc)
                goto out;
 
-       intel_pstate_debug_expose_params();
+       if (intel_pstate_driver == &intel_pstate && !hwp_active &&
+           pstate_funcs.get_target_pstate != get_target_pstate_use_cpu_load)
+               intel_pstate_debug_expose_params();
+
        intel_pstate_sysfs_expose_params();
 
        if (hwp_active)