diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-01 16:10:08 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-01 16:10:08 -0400 |
| commit | 797cb8a6f7f1244ddd1e4bebebe38786d667057f (patch) | |
| tree | 6141da5b66b3e33bb18706e8b19e6e246ec27de7 /include | |
| parent | f01a586560ac492373add2550c0f93a002be3e65 (diff) | |
| parent | 236a98005274d8011136aee4aef52241588a9712 (diff) | |
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 @@ | |||
| 16 | #include <linux/completion.h> | 16 | #include <linux/completion.h> |
| 17 | #include <linux/kobject.h> | 17 | #include <linux/kobject.h> |
| 18 | #include <linux/notifier.h> | 18 | #include <linux/notifier.h> |
| 19 | #include <linux/spinlock.h> | ||
| 19 | #include <linux/sysfs.h> | 20 | #include <linux/sysfs.h> |
| 20 | 21 | ||
| 21 | /********************************************************************* | 22 | /********************************************************************* |
| @@ -104,6 +105,11 @@ struct cpufreq_policy { | |||
| 104 | * __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT); | 105 | * __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT); |
| 105 | */ | 106 | */ |
| 106 | struct rw_semaphore rwsem; | 107 | struct rw_semaphore rwsem; |
| 108 | |||
| 109 | /* Synchronization for frequency transitions */ | ||
| 110 | bool transition_ongoing; /* Tracks transition status */ | ||
| 111 | spinlock_t transition_lock; | ||
| 112 | wait_queue_head_t transition_wait; | ||
| 107 | }; | 113 | }; |
| 108 | 114 | ||
| 109 | /* Only for ACPI */ | 115 | /* Only for ACPI */ |
| @@ -333,9 +339,9 @@ static inline void cpufreq_resume(void) {} | |||
| 333 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 339 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
| 334 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | 340 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); |
| 335 | 341 | ||
| 336 | void cpufreq_notify_transition(struct cpufreq_policy *policy, | 342 | void cpufreq_freq_transition_begin(struct cpufreq_policy *policy, |
| 337 | struct cpufreq_freqs *freqs, unsigned int state); | 343 | struct cpufreq_freqs *freqs); |
| 338 | void cpufreq_notify_post_transition(struct cpufreq_policy *policy, | 344 | void cpufreq_freq_transition_end(struct cpufreq_policy *policy, |
| 339 | struct cpufreq_freqs *freqs, int transition_failed); | 345 | struct cpufreq_freqs *freqs, int transition_failed); |
| 340 | 346 | ||
| 341 | #else /* CONFIG_CPU_FREQ */ | 347 | #else /* CONFIG_CPU_FREQ */ |
