summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/algos
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-23 00:00:47 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-24 03:04:32 +0100
commit80b120ca1a75c2df093d15936ab0591d90c99de9 (patch)
treee90a305d114dc1efbc5bf197e958f94bb735208d /drivers/i2c/algos
parentc5a2ee7dde893e0a06044e75c16711f08d5c011d (diff)
downloadlinux-stable-80b120ca1a75c2df093d15936ab0591d90c99de9.tar.gz
linux-stable-80b120ca1a75c2df093d15936ab0591d90c99de9.tar.bz2
linux-stable-80b120ca1a75c2df093d15936ab0591d90c99de9.zip
cpufreq: intel_pstate: Avoid transient updates of cpuinfo.max_freq
Both intel_pstate_verify_policy() and intel_cpufreq_verify_policy() set policy->cpuinfo.max_freq depending on the turbo status, but the updates made by them are discarded by the core, because the policy object passed to them by the core is temporary and cpuinfo.max_freq from that object is not copied to the final policy object in cpufreq_set_policy(). However, cpufreq_set_policy() passes the temporary policy object to the ->setpolicy callback of the driver, so intel_pstate_set_policy() actually sees the policy->cpuinfo.max_freq value updated by intel_pstate_verify_policy() and not the final one. It also updates policy->max sometimes which basically has no effect after it returns, because the core discards that update. To avoid confusion, eliminate policy->cpuinfo.max_freq updates from intel_pstate_verify_policy() and intel_cpufreq_verify_policy() entirely and check the maximum frequency explicitly in intel_pstate_update_perf_limits() instead of relying on the transiently updated policy->cpuinfo.max_freq value. Moreover, move the max->policy adjustment carried out in intel_pstate_set_policy() to a separate function and call that function from the ->verify driver callbacks to ensure that it will actually be effective. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/i2c/algos')
0 files changed, 0 insertions, 0 deletions