X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=kernel%2Fcpu%2Fidle.c;h=277f494c2a9ae695c9a61dd44e5a2bfe68d75b2c;hb=c7d489fa670f9d54dd05b46d81397ec6df208e60;hp=988573a9a387665dddc402af2439996aa02fd1c0;hpb=825e587af2e90e9b953849f3347a01d8f383d577;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c index 988573a..277f494 100644 --- a/kernel/cpu/idle.c +++ b/kernel/cpu/idle.c @@ -105,14 +105,17 @@ static void cpu_idle_loop(void) __current_set_polling(); } arch_cpu_idle_exit(); - /* - * We need to test and propagate the TIF_NEED_RESCHED - * bit here because we might not have send the - * reschedule IPI to idle tasks. - */ - if (tif_need_resched()) - set_preempt_need_resched(); } + + /* + * Since we fell out of the loop above, we know + * TIF_NEED_RESCHED must be set, propagate it into + * PREEMPT_NEED_RESCHED. + * + * This is required because for polling idle loops we will + * not have had an IPI to fold the state for us. + */ + preempt_set_need_resched(); tick_nohz_idle_exit(); schedule_preempt_disabled(); }