Merge branch 'pm-fixes'

* pm-fixes:
  cpufreq: Fix serialization of frequency transitions
This commit is contained in:
Rafael J. Wysocki 2013-07-08 21:49:25 +02:00
commit 85a229f4c7
2 changed files with 5 additions and 4 deletions

View File

@ -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,

View File

@ -119,7 +119,7 @@ struct cpufreq_policy {
struct kobject kobj;
struct completion kobj_unregister;
bool transition_ongoing; /* Tracks transition status */
int transition_ongoing; /* Tracks transition status */
};
#define CPUFREQ_ADJUST (0)