OSDN Git Service

PM / sleep: Make it possible to quiesce timers during suspend-to-idle
[uclinux-h8/linux.git] / include / linux / cpuidle.h
index ab70f3b..f551a92 100644 (file)
@@ -50,6 +50,15 @@ struct cpuidle_state {
                        int index);
 
        int (*enter_dead) (struct cpuidle_device *dev, int index);
+
+       /*
+        * CPUs execute ->enter_freeze with the local tick or entire timekeeping
+        * suspended, so it must not re-enable interrupts at any point (even
+        * temporarily) or attempt to change states of clock event devices.
+        */
+       void (*enter_freeze) (struct cpuidle_device *dev,
+                             struct cpuidle_driver *drv,
+                             int index);
 };
 
 /* Idle State Flags */
@@ -141,7 +150,7 @@ extern void cpuidle_resume(void);
 extern int cpuidle_enable_device(struct cpuidle_device *dev);
 extern void cpuidle_disable_device(struct cpuidle_device *dev);
 extern int cpuidle_play_dead(void);
-extern void cpuidle_use_deepest_state(bool enable);
+extern void cpuidle_enter_freeze(void);
 
 extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
 #else
@@ -174,7 +183,7 @@ static inline int cpuidle_enable_device(struct cpuidle_device *dev)
 {return -ENODEV; }
 static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
 static inline int cpuidle_play_dead(void) {return -ENODEV; }
-static inline void cpuidle_use_deepest_state(bool enable) {}
+static inline void cpuidle_enter_freeze(void) { }
 static inline struct cpuidle_driver *cpuidle_get_cpu_driver(
        struct cpuidle_device *dev) {return NULL; }
 #endif