[PATCH 01/20] ARM: clean up idle handlers

Shawn Guo shawn.guo at freescale.com
Sat Dec 24 20:42:28 EST 2011


On Mon, Dec 19, 2011 at 04:47:30AM -0500, Nicolas Pitre wrote:
> Let's factor out the need_resched() check instead of having it duplicated
> in every pm_idle implementations to avoid inconsistencies (omap2_pm_idle
> was missing it already).
> 
> The forceful re-enablement of IRQs after pm_idle has returned can go.
> The warning certainly doesn't trigger for existing users.  Similar for
> the redundant local_irq_disable() call in the OMAP implementations.
> 
> To get rid of the pm_idle calling convention oddity, let's introduce
> arm_pm_idle() allowing for the local_irq_enable() to be factored out
> from SOC specific implementations. The default pm_idle function becomes
> a wrapper for arm_pm_idle and it takes care of enabling IRQs closer to
> where they are initially disabled.
> 
> And finally move the comment explaining the reason for that turning off
> of IRQs to a more proper location.
> 
> Signed-off-by: Nicolas Pitre <nicolas.pitre at linaro.org>
> ---
>  arch/arm/include/asm/system.h |    1 +
>  arch/arm/kernel/process.c     |   23 +++++++++++++++--------
>  arch/arm/mach-omap1/pm.c      |   19 ++++++-------------
>  arch/arm/mach-omap2/pm24xx.c  |    5 ++---
>  arch/arm/mach-omap2/pm34xx.c  |    7 +++----
>  arch/arm/mach-omap2/pm44xx.c  |    2 ++
>  arch/arm/mach-s5p64x0/cpu.c   |   16 +++++++---------
>  7 files changed, 36 insertions(+), 37 deletions(-)
> 
There is one more since v3.2-rc4, imx5_idle() in arch/arm/mach-mx5/mm.c

-- 
Regards,
Shawn




More information about the linux-arm-kernel mailing list