• Anton Blanchard's avatar
    [PATCH] ppc64: clean up idle loop code · c76101e8
    Anton Blanchard authored
    Clean up our idle loop code:
    
    - Remove a bunch of useless includes and make most functions static
    - There were places where we werent disabling interrupts before checking
      need_resched then calling the hypervisor to sleep our thread. We might
      race with an IPI and end up missing a reschedule. Disable interrupts
      around these regions to make them safe.
    - We forgot to turn off the polling flag when exiting the dedicated_idle
      idle loop. This could have resulted in all manner problems as other
      cpus would avoid sending IPIs to force reschedules.
    - Add a missing check for cpu_is_offline in the shared cpu idle loop.
    Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    c76101e8
idle.c 7.08 KB