|
@@ -312,11 +312,12 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
|
|
|
switch (state) {
|
|
|
|
|
|
case CPUFREQ_PRECHANGE:
|
|
|
- if (WARN(policy->transition_ongoing,
|
|
|
+ if (WARN(policy->transition_ongoing ==
|
|
|
+ cpumask_weight(policy->cpus),
|
|
|
"In middle of another frequency transition\n"))
|
|
|
return;
|
|
|
|
|
|
- policy->transition_ongoing = true;
|
|
|
+ policy->transition_ongoing++;
|
|
|
|
|
|
/* detect if the driver reported a value as "old frequency"
|
|
|
* which is not equal to what the cpufreq core thinks is
|
|
@@ -341,7 +342,7 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
|
|
|
"No frequency transition in progress\n"))
|
|
|
return;
|
|
|
|
|
|
- policy->transition_ongoing = false;
|
|
|
+ policy->transition_ongoing--;
|
|
|
|
|
|
adjust_jiffies(CPUFREQ_POSTCHANGE, freqs);
|
|
|
pr_debug("FREQ: %lu - CPU: %lu", (unsigned long)freqs->new,
|