diff options
author | njl <njl@FreeBSD.org> | 2007-11-02 17:29:36 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2007-11-02 17:29:36 +0000 |
commit | d46e24923c6d99fcb516d831ebe31061eb9c3e51 (patch) | |
tree | d2bccca6a36002796e64be6a904bf3b8a0962878 /sys/dev/acpica | |
parent | f570dc9af64bc922f3b4d29f33f5b3c4486c663a (diff) | |
download | FreeBSD-src-d46e24923c6d99fcb516d831ebe31061eb9c3e51.zip FreeBSD-src-d46e24923c6d99fcb516d831ebe31061eb9c3e51.tar.gz |
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
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi_cpu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index 324f0a4..eb5ce53 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -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); } |