|
@@ -16,6 +16,7 @@
|
|
#include <linux/completion.h>
|
|
#include <linux/completion.h>
|
|
#include <linux/kobject.h>
|
|
#include <linux/kobject.h>
|
|
#include <linux/notifier.h>
|
|
#include <linux/notifier.h>
|
|
|
|
+#include <linux/spinlock.h>
|
|
#include <linux/sysfs.h>
|
|
#include <linux/sysfs.h>
|
|
|
|
|
|
/*********************************************************************
|
|
/*********************************************************************
|
|
@@ -104,6 +105,11 @@ struct cpufreq_policy {
|
|
* __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
|
|
* __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
|
|
*/
|
|
*/
|
|
struct rw_semaphore rwsem;
|
|
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 */
|
|
/* Only for ACPI */
|
|
@@ -337,6 +343,10 @@ void cpufreq_notify_transition(struct cpufreq_policy *policy,
|
|
struct cpufreq_freqs *freqs, unsigned int state);
|
|
struct cpufreq_freqs *freqs, unsigned int state);
|
|
void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
|
|
void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
|
|
struct cpufreq_freqs *freqs, int transition_failed);
|
|
struct cpufreq_freqs *freqs, int transition_failed);
|
|
|
|
+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 */
|
|
#else /* CONFIG_CPU_FREQ */
|
|
static inline int cpufreq_register_notifier(struct notifier_block *nb,
|
|
static inline int cpufreq_register_notifier(struct notifier_block *nb,
|