@@ -41,6 +41,8 @@
*/
static LIST_HEAD(cpu_data_list);
+static struct cppc_cpudata *cppc_cpufreq_search_cpu_data(unsigned int cpu);
+
static bool boost_supported;
struct cppc_workaround_oem_info {
@@ -479,6 +481,19 @@ static void cppc_cpufreq_put_cpu_data(struct cpufreq_policy *policy)
policy->driver_data = NULL;
}
+static struct cppc_cpudata *
+cppc_cpufreq_search_cpu_data(unsigned int cpu)
+{
+ struct cppc_cpudata *iter, *tmp;
+
+ list_for_each_entry_safe(iter, tmp, &cpu_data_list, node) {
+ if (cpumask_test_cpu(cpu, iter->shared_cpu_map))
+ return iter;
+ }
+
+ return NULL;
+}
+
static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
unsigned int cpu = policy->cpu;