lkml.org 
[lkml]   [2013]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 07/34] alpha: Use generic idle loop
On Thu, 28 Mar 2013, Srivatsa S. Bhat wrote:
> (In all my replies, I'm referring to the code in your v2 on your git
> tree, but replying to the corresponding patches in your v1).
>
> So, in alpha, we poll in cpu idle. In the generic implementation in
> kernel/cpu/idle.c, arch_cpu_idle() is defined as:
>
> void __weak arch_cpu_idle(void)
> {
> cpu_idle_poll();
> }
>
> Should it not have been:
>
> void __weak arch_cpu_idle(void)
> {
> current_set_polling();
> cpu_idle_poll();
> current_clr_polling();
> }
>
> instead?

Hmm, we should not clear it at all, because we are always polling and
never leave polling mode. So instead of calling cpu_idle_poll from the
weak arch_cpu_idle() we should set cpu_idle_force_poll so we drop into

if (cpu_idle_force_poll) {
cpu_idle_poll();
} else ...

which keeps the polling flag set.

Thanks,

tglx




\
 
 \ /
  Last update: 2013-03-29 13:01    [W:0.696 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site