|
27 | 27 | #include <linux/export.h>
|
28 | 28 | #include <linux/suspend.h>
|
29 | 29 | #include <linux/syscore_ops.h>
|
| 30 | +#include <linux/swait.h> |
30 | 31 | #include <linux/ftrace.h>
|
31 | 32 | #include <trace/events/power.h>
|
32 | 33 | #include <linux/compiler.h>
|
@@ -57,7 +58,7 @@ EXPORT_SYMBOL_GPL(pm_suspend_global_flags);
|
57 | 58 |
|
58 | 59 | static const struct platform_suspend_ops *suspend_ops;
|
59 | 60 | static const struct platform_s2idle_ops *s2idle_ops;
|
60 |
| -static DECLARE_WAIT_QUEUE_HEAD(s2idle_wait_head); |
| 61 | +static DECLARE_SWAIT_QUEUE_HEAD(s2idle_wait_head); |
61 | 62 |
|
62 | 63 | enum s2idle_states __read_mostly s2idle_state;
|
63 | 64 | static DEFINE_SPINLOCK(s2idle_lock);
|
@@ -91,8 +92,8 @@ static void s2idle_enter(void)
|
91 | 92 | /* Push all the CPUs into the idle loop. */
|
92 | 93 | wake_up_all_idle_cpus();
|
93 | 94 | /* Make the current CPU wait so it can enter the idle loop too. */
|
94 |
| - wait_event(s2idle_wait_head, |
95 |
| - s2idle_state == S2IDLE_STATE_WAKE); |
| 95 | + swait_event(s2idle_wait_head, |
| 96 | + s2idle_state == S2IDLE_STATE_WAKE); |
96 | 97 |
|
97 | 98 | cpuidle_pause();
|
98 | 99 | put_online_cpus();
|
@@ -159,7 +160,7 @@ void s2idle_wake(void)
|
159 | 160 | spin_lock_irqsave(&s2idle_lock, flags);
|
160 | 161 | if (s2idle_state > S2IDLE_STATE_NONE) {
|
161 | 162 | s2idle_state = S2IDLE_STATE_WAKE;
|
162 |
| - wake_up(&s2idle_wait_head); |
| 163 | + swake_up(&s2idle_wait_head); |
163 | 164 | }
|
164 | 165 | spin_unlock_irqrestore(&s2idle_lock, flags);
|
165 | 166 | }
|
|
0 commit comments