]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: Fix sysfs limits enforcement for performance policy
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 18 Jan 2017 18:48:22 +0000 (10:48 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 20 Jan 2017 02:35:27 +0000 (03:35 +0100)
commit5538d38ff377cbefaceceea8de7058d21aea0206
treedef815751417aada210da2d2a2e9467ff8cb467c
parente805f9b93d1d24e82cdc3a2175863f2db5d74d65
cpufreq: intel_pstate: Fix sysfs limits enforcement for performance policy

A side effect of keeping intel_pstate sysfs limits in sync with cpufreq
is that the now sysfs limits can't enforced under performance policy.

For example, if the max_perf_pct is changed from 100 to 80, this will call
intel_pstate_set_policy(), which will change the max_perf to 100 again for
performance policy. Same issue happens, when no_turbo is set.

This change calculates max and min frequency using sysfs performance
limits in intel_pstate_verify_policy() and adjusts policy limits by
calling cpufreq_verify_within_limits().

Also, it causes the setting of performance limits to be skipped if
no_turbo is set.

Fixes: 15d2dbea7585 (cpufreq: intel_pstate: Always keep all limits settings in sync)
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