cpuidle: extend cpuidle and menu governor to handle dynamic states
[sfrench/cifs-2.6.git] / include / linux / cpuidle.h
index 55215cce50052583c93dcbc9771ed5c8e833bbc4..36ca9721a0c28a0150b05153b4f442d2c558d6d4 100644 (file)
@@ -52,6 +52,7 @@ struct cpuidle_state {
 #define CPUIDLE_FLAG_SHALLOW   (0x20) /* low latency, minimal savings */
 #define CPUIDLE_FLAG_BALANCED  (0x40) /* medium latency, moderate savings */
 #define CPUIDLE_FLAG_DEEP      (0x80) /* high latency, large savings */
+#define CPUIDLE_FLAG_IGNORE    (0x100) /* ignore during this idle period */
 
 #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
 
@@ -84,6 +85,7 @@ struct cpuidle_state_kobj {
 struct cpuidle_device {
        unsigned int            registered:1;
        unsigned int            enabled:1;
+       unsigned int            power_specified:1;
        unsigned int            cpu;
 
        int                     last_residency;
@@ -97,6 +99,8 @@ struct cpuidle_device {
        struct completion       kobj_unregister;
        void                    *governor_data;
        struct cpuidle_state    *safe_state;
+
+       int (*prepare)          (struct cpuidle_device *dev);
 };
 
 DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);