summaryrefslogtreecommitdiffstats
path: root/kernel/sched/idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched/idle.c')
-rw-r--r--kernel/sched/idle.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index fe4b24bf33ca..cf009fb0bc25 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -12,6 +12,8 @@
#include <trace/events/power.h>
+#include "sched.h"
+
static int __read_mostly cpu_idle_force_poll;
void cpu_idle_poll_ctrl(bool enable)
@@ -237,12 +239,14 @@ static void cpu_idle_loop(void)
__current_clr_polling();
/*
- * We promise to reschedule if need_resched is set while
- * polling is set. That means that clearing polling
- * needs to be visible before rescheduling.
+ * We promise to call sched_ttwu_pending and reschedule
+ * if need_resched is set while polling is set. That
+ * means that clearing polling needs to be visible
+ * before doing these things.
*/
smp_mb__after_atomic();
+ sched_ttwu_pending();
schedule_preempt_disabled();
}
}