[PATCH v2] Add call to non-crashing cores through IPI

Olof Johansson olof at lixom.net
Mon Nov 29 12:47:05 EST 2010


On Mon, Nov 29, 2010 at 01:46:26PM +0100, Per Fransson wrote:
> >>  void machine_crash_shutdown(struct pt_regs *regs)
> >>  {
> >> +     unsigned long msecs;
> >
> > Int should be enough here? Not that it makes a difference on ARM, but
> > anyway. :)
> >
> >> +
> >>       local_irq_disable();
> >> +
> >> +     atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
> >> +     smp_call_function(machine_crash_nonpanic_core, NULL, false);
> >> +     msecs = 1000; /* Wait at most a second for the other cpus to stop */
> >> +     while ((atomic_read(&waiting_for_crash_ipi) > 0) && msecs) {
> >> +             mdelay(1);
> >> +             msecs--;
> >> +     }
> 
> The choice of type comes from the corresponding x86 code in
> 
>     arch/x86/kernel/reboot.c:nmi_shootdown_cpus()
> 
> Should we deviate?

We've already spent more time discussing this than it's worth. :-)
Leave it if you prefer.


-Olof



More information about the kexec mailing list