diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-02 00:10:08 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-02 00:10:08 +0400 |
commit | 797cb8a6f7f1244ddd1e4bebebe38786d667057f (patch) | |
tree | 6141da5b66b3e33bb18706e8b19e6e246ec27de7 /include | |
parent | f01a586560ac492373add2550c0f93a002be3e65 (diff) | |
parent | 236a98005274d8011136aee4aef52241588a9712 (diff) | |
download | linux-797cb8a6f7f1244ddd1e4bebebe38786d667057f.tar.xz |
Merge branch 'pm-cpufreq'
* pm-cpufreq:
cpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static
cpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}
cpufreq: Make sure frequency transitions are serialized
intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop
cpufreq: resume drivers before enabling governors
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpufreq.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 2d2e62c8666a..c48e595f623e 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -16,6 +16,7 @@ #include <linux/completion.h> #include <linux/kobject.h> #include <linux/notifier.h> +#include <linux/spinlock.h> #include <linux/sysfs.h> /********************************************************************* @@ -104,6 +105,11 @@ struct cpufreq_policy { * __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT); */ struct rw_semaphore rwsem; + + /* Synchronization for frequency transitions */ + bool transition_ongoing; /* Tracks transition status */ + spinlock_t transition_lock; + wait_queue_head_t transition_wait; }; /* Only for ACPI */ @@ -333,9 +339,9 @@ static inline void cpufreq_resume(void) {} int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); -void cpufreq_notify_transition(struct cpufreq_policy *policy, - struct cpufreq_freqs *freqs, unsigned int state); -void cpufreq_notify_post_transition(struct cpufreq_policy *policy, +void cpufreq_freq_transition_begin(struct cpufreq_policy *policy, + struct cpufreq_freqs *freqs); +void cpufreq_freq_transition_end(struct cpufreq_policy *policy, struct cpufreq_freqs *freqs, int transition_failed); #else /* CONFIG_CPU_FREQ */ |