cpufreq: intel_pstate: fix inconsistency in setting policy limits
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 4 Apr 2016 02:42:11 +0000 (19:42 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 5 Apr 2016 01:37:13 +0000 (03:37 +0200)
commit30a3915385f124a6e3c81df4070f531d4f84299b
tree157f23f9ae570cef26efc99120d7ca0eab858f34
parentfebce40febcff3ccdb33f63456ffc4cfc61640c8
cpufreq: intel_pstate: fix inconsistency in setting policy limits

When user sets performance policy using cpufreq interface, it is possible
that because of policy->max limits, the actual performance is still
limited. But the current implementation will silently switch the
policy to powersave and start using powersave limits. If user modifies
any limits using intel_pstate sysfs, this is actually changing powersave
limits.

The current implementation tracks limits under powersave and performance
policy using two different variables. When policy->max is less than
policy->cpuinfo.max_freq, only powersave limit variable is used.

This fix causes the performance limits variable to be used always when
the policy is performance.

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