Pull bugzilla-5737 into release branch
[pandora-kernel.git] / include / linux / cpufreq.h
index c31650d..35e1376 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef _LINUX_CPUFREQ_H
 #define _LINUX_CPUFREQ_H
 
-#include <linux/config.h>
+#include <linux/mutex.h>
 #include <linux/notifier.h>
 #include <linux/threads.h>
 #include <linux/device.h>
@@ -72,6 +72,8 @@ struct cpufreq_real_policy {
 
 struct cpufreq_policy {
        cpumask_t               cpus;   /* affected CPUs */
+       unsigned int            shared_type; /* ANY or ALL affected CPUs
+                                               should set cpufreq */
        unsigned int            cpu;    /* cpu nr of registered CPU */
        struct cpufreq_cpuinfo  cpuinfo;/* see above */
 
@@ -82,7 +84,7 @@ struct cpufreq_policy {
         unsigned int           policy; /* see above */
        struct cpufreq_governor *governor; /* see below */
 
-       struct semaphore        lock;   /* CPU ->setpolicy or ->target may
+       struct mutex            lock;   /* CPU ->setpolicy or ->target may
                                           only be called once a time */
 
        struct work_struct      update; /* if update_policy() needs to be
@@ -98,6 +100,10 @@ struct cpufreq_policy {
 #define CPUFREQ_INCOMPATIBLE   (1)
 #define CPUFREQ_NOTIFY         (2)
 
+#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
+#define CPUFREQ_SHARED_TYPE_HW  (1) /* HW does needed coordination */
+#define CPUFREQ_SHARED_TYPE_ALL         (2) /* All dependent CPUs should set freq */
+#define CPUFREQ_SHARED_TYPE_ANY         (3) /* Freq can be set from any dependent CPU*/
 
 /******************** cpufreq transition notifiers *******************/