summaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-06-19 10:16:55 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-27 21:49:55 +0200
commit7c30ed532cf798a8d924562f2f44d03d7652f7a7 (patch)
tree6198099d8f7fc69c3510908d539df878857684cd /include/linux/cpufreq.h
parente11158c0c9ab59d46bb70953f6275643a7a01fa1 (diff)
downloadop-kernel-dev-7c30ed532cf798a8d924562f2f44d03d7652f7a7.zip
op-kernel-dev-7c30ed532cf798a8d924562f2f44d03d7652f7a7.tar.gz
cpufreq: make sure frequency transitions are serialized
Whenever we are changing frequency of a cpu, we are calling PRECHANGE and POSTCHANGE notifiers. They must be serialized. i.e. PRECHANGE or POSTCHANGE shouldn't be called twice contiguously. This can happen due to bugs in users of __cpufreq_driver_target() or actual cpufreq drivers who are sending these notifiers. This patch adds some protection against this. Now, we keep track of the last transaction and see if something went wrong. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 3c7ee2f..c0bc737 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -119,6 +119,7 @@ struct cpufreq_policy {
struct kobject kobj;
struct completion kobj_unregister;
+ bool transition_ongoing; /* Tracks transition status */
};
#define CPUFREQ_ADJUST (0)
OpenPOWER on IntegriCloud