[PATCH V2 2/2] ARM: decouple CPU offlining from reboot/shutdown

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Jun 13 13:10:29 EDT 2013


On Thu, Jun 13, 2013 at 08:45:51AM +0100, Will Deacon wrote:
> Hi Stephen,
> 
> On Wed, Jun 12, 2013 at 09:01:21PM +0100, Stephen Warren wrote:
> >  void machine_shutdown(void)
> >  {
> > -#ifdef CONFIG_SMP
> > -	smp_send_stop();
> > -#endif
> > +	disable_nonboot_cpus();
> >  }
> 
> Any reason not to move this into machine_kexec and leave machine_shutdown
> as a nop?

If you take a peek at kernel/kexec.c, machine_shutdown() is only invoked
if we haven't frozen processes and already disabled via hotplug the other
CPUs - which will have already been done via disable_nonboot_cpus() in
that path.

So moving it to kexec would mean that path calls disable_nonboot_cpus()
twice, which probably isn't a good thing.



More information about the linux-arm-kernel mailing list