CPU_PM_ENTER_PREPARE is called before adding a timer event.
CPU_PM_EXIT is called after CPU_PM_EXIT.
Change-Id: I339cdcc1d20bbbbeb85de9f3b8bbf79150c7dfe5
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
* Event codes passed as unsigned long val to notifier calls
*/
enum cpu_pm_event {
+ /* A single cpu is preparing lopower state */
+ CPU_PM_ENTER_PREPARE,
+
/* A single cpu is entering a low power state */
CPU_PM_ENTER,
/* A single cpu is exiting a low power state */
CPU_PM_EXIT,
+ /* A single cpu is post existing a low power state */
+ CPU_PM_EXIT_POST,
+
/* A cpu power domain is entering a low power state */
CPU_CLUSTER_PM_ENTER,
int cpu_pm_exit(void);
int cpu_cluster_pm_enter(void);
int cpu_cluster_pm_exit(void);
+int cpu_pm_enter_pre(void);
+int cpu_pm_exit_post(void);
#else
{
return 0;
}
+
+static inline int cpu_pm_enter_pre(void)
+{
+ return 0;
+}
+
+static inline int cpu_pm_exit_post(void)
+{
+ return 0;
+}
+
#endif
#endif
}
EXPORT_SYMBOL_GPL(cpu_pm_enter);
+int cpu_pm_enter_pre(void)
+{
+ return cpu_pm_notify(CPU_PM_ENTER_PREPARE, -1, NULL);
+}
+EXPORT_SYMBOL_GPL(cpu_pm_enter_pre);
+
/**
* cpu_pm_exit - CPU low power exit notifier
*
}
EXPORT_SYMBOL_GPL(cpu_pm_exit);
+int cpu_pm_exit_post(void)
+{
+ return cpu_pm_notify(CPU_PM_EXIT_POST, -1, NULL);
+}
+EXPORT_SYMBOL_GPL(cpu_pm_exit_post);
+
/**
* cpu_cluster_pm_enter - CPU cluster low power entry notifier
*
#include <linux/stackprotector.h>
#include <linux/suspend.h>
#include <linux/livepatch.h>
+#include <linux/cpu_pm.h>
#include <asm/tlb.h>
*/
__current_set_polling();
+ cpu_pm_enter_pre();
quiet_vmstat();
tick_nohz_idle_enter();
* This is required because for polling idle loops we will not have had
* an IPI to fold the state for us.
*/
+ cpu_pm_exit_post();
preempt_set_need_resched();
tick_nohz_idle_exit();
__current_clr_polling();