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

Russell King - ARM Linux linux at arm.linux.org.uk
Sat Oct 29 16:05:48 EDT 2011


On Sat, Oct 29, 2011 at 02:56:53PM +0100, Will Deacon wrote:
> Hi Russell,
> 
> On Sat, Oct 29, 2011 at 11:21:08AM +0100, Russell King - ARM Linux wrote:
> > I think this is slightly the wrong approach.  We already have:
> > 
> > void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
> > EXPORT_SYMBOL_GPL(arm_pm_restart);
> > 
> > so why do we need a new function pointer?  We could convert the bulk of
> > arm_machine_restart() to a library function (setup_restart()), moving
> > the failure to reboot into machine_restart().
> 
> Funny you should mention this approach. I've been toying with something
> similar for the kexec reset path but I hadn't managed to join the dots
> between that and the arch_reset code.
> 
> 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.

> I'll give this a go for v2, thanks. Once this is sorted out I'll do a second
> pass to clean up the reboot modes since I've already got some patches for
> that.

Great.



More information about the linux-arm-kernel mailing list