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

Per Fransson per.fransson.ml at gmail.com
Mon Nov 29 07:46:26 EST 2010


>>  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?

Regards,
Per



More information about the linux-arm-kernel mailing list