[PATCH 01/51] ARM: reset: introduce arm_arch_reset function pointer

Will Deacon will.deacon at arm.com
Sun Oct 30 17:07:36 EDT 2011


On Sat, Oct 29, 2011 at 09:05:48PM +0100, Russell King - ARM Linux wrote:
> On Sat, Oct 29, 2011 at 02:56:53PM +0100, Will Deacon wrote:
> > I initially observed this in the idle code, where it looks to me like all
> > the pm_idle overrides could actually be done in the arch_idle hook (the only
> > slightly fiddly one is OMAP). Maybe Nicolas could use the same sort of
> > approach for that?
> 
> Beware about changing the semantics of pm_idle - it's a cross-arch thing,
> and we really shouldn't change those semantics without changing the other
> architectures as well.

Indeed. I'm not suggesting making any changes to pm_idle, I'm just pointing
out that all of the pm_idle overrides for ARM can be written as:

	if (!need_resched())
		do_magic_soc_specific_idle();
	local_irq_enable();

so the platform magic may as well just be implemented using arch_idle and we
can remove the ability to reassign pm_idle, therefore consolidating the
platform idle code into one function pointer.

Will



More information about the linux-arm-kernel mailing list