Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1142bb4b authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

idle: exit the cpu_idle_poll loop if cpu_idle_force_poll is cleared



cpu_idle_poll_ctrl allows the enabling/disabling of the idle
polling mode; this mode allows a CPU to spin waiting for a
new task to be scheduled rather than having to execute the
arch specific idle code.

However, the loop that checks for a new task does not look
at the flag that enables idle polling mode. So, the CPU may
continue to spin even though the aforementioned flag has
been cleared. Since the CPU is already in idle, it may be
a while before a task is scheduled, precluding potential
power savings.

Modify the while loop conditional in question to also check
if the cpu_idle_force_poll flag is set.

Change-Id: Ia2e83af97890dc399b86e090459a41d31ce28b6c
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent a00c5ba3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment