rcu_read_unlock();
}
-DEFINE_MUTEX(cpufreq_governor_lock);
-
/* Flag to suspend/resume CPUFreq governors */
static bool cpufreq_suspended;
pr_debug("%s: for CPU %u, event %u\n", __func__, policy->cpu, event);
- mutex_lock(&cpufreq_governor_lock);
if ((policy->governor_enabled && event == CPUFREQ_GOV_START)
|| (!policy->governor_enabled
&& (event == CPUFREQ_GOV_LIMITS || event == CPUFREQ_GOV_STOP))) {
- mutex_unlock(&cpufreq_governor_lock);
return -EBUSY;
}
else if (event == CPUFREQ_GOV_START)
policy->governor_enabled = true;
- mutex_unlock(&cpufreq_governor_lock);
-
ret = policy->governor->governor(policy, event);
if (!ret) {
policy->governor->initialized--;
} else {
/* Restore original values */
- mutex_lock(&cpufreq_governor_lock);
if (event == CPUFREQ_GOV_STOP)
policy->governor_enabled = true;
else if (event == CPUFREQ_GOV_START)
policy->governor_enabled = false;
- mutex_unlock(&cpufreq_governor_lock);
}
if (((event == CPUFREQ_GOV_POLICY_INIT) && ret) ||
}
extern struct mutex dbs_data_mutex;
-extern struct mutex cpufreq_governor_lock;
void dbs_check_cpu(struct cpufreq_policy *policy);
int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event);
void od_register_powersave_bias_handler(unsigned int (*f)