]> asedeno.scripts.mit.edu Git - linux.git/commit
cpufreq: CPPC: Initialize shared perf capabilities of CPUs
authorShunyong Yang <shunyong.yang@hxt-semitech.com>
Fri, 6 Apr 2018 02:43:49 +0000 (10:43 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 10 Apr 2018 06:38:02 +0000 (08:38 +0200)
commit8913315e9459b146e5888ab5138e10daa061b885
tree4090fd8c18406541ad0e73c9f3bf071be941d9f3
parentbbcc328561040292f7d6796954d478e4a2335e6f
cpufreq: CPPC: Initialize shared perf capabilities of CPUs

When multiple CPUs are related in one cpufreq policy, the first online
CPU will be chosen by default to handle cpufreq operations. Let's take
cpu0 and cpu1 as an example.

When cpu0 is offline, policy->cpu will be shifted to cpu1. cpu1's perf
capabilities should be initialized. Otherwise, perf capabilities are 0s
and speed change can not take effect.

This patch copies perf capabilities of the first online CPU to other
shared CPUs when policy shared type is CPUFREQ_SHARED_TYPE_ANY.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cppc_cpufreq.c