Fix a shutdown hang on some SMP systems. The previous logic was to IPI all
CPUs to make sure idle threads are evicted from the softc before returning from acpi_cpu_shutdown(). However, this is unnecessary since stop_cpus() handles this for itself and at this point it's possible that our IPI will be blocked (interrupts disabled). Thanks to: Glen Leeder <glen.leeder / nokia.com> MFC after: 3 days
This commit is contained in:
parent
f570dc9af6
commit
d46e24923c
@ -501,12 +501,14 @@ acpi_cpu_shutdown(device_t dev)
|
||||
/* Allow children to shutdown first. */
|
||||
bus_generic_shutdown(dev);
|
||||
|
||||
/* Disable any entry to the idle function. */
|
||||
/*
|
||||
* Disable any entry to the idle function. There is a small race where
|
||||
* an idle thread have passed this check but not gone to sleep. This
|
||||
* is ok since device_shutdown() does not free the softc, otherwise
|
||||
* we'd have to be sure all threads were evicted before returning.
|
||||
*/
|
||||
cpu_disable_idle = TRUE;
|
||||
|
||||
/* Signal and wait for all processors to exit acpi_cpu_idle(). */
|
||||
smp_rendezvous(NULL, NULL, NULL, NULL);
|
||||
|
||||
return_VALUE (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user