diff options
author | Mark Lord <lkml@rtr.ca> | 2007-10-01 01:20:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-10 10:50:16 -0700 |
commit | 433d028c427f90a2ab38b6eab752e19cd1ac9981 (patch) | |
tree | 0a657ada026a6c4e52582e89fbb3536f507ce9a3 /kernel | |
parent | 2c0cf342f6fc11e6de814464c035a37d8c17fb17 (diff) |
Fix SMP poweroff hangs
commit 4047727e5ae33f9b8d2b7766d1994ea6e5ec2991 from upstream
We need to disable all CPUs other than the boot CPU (usually 0) before
attempting to power-off modern SMP machines. This fixes the
hang-on-poweroff issue on my MythTV SMP box, and also on Thomas Gleixner's
new toybox.
Signed-off-by: Mark Lord <mlord@pobox.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 28e8364ad68a..afd9b93069f9 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -31,6 +31,7 @@ #include <linux/cn_proc.h> #include <linux/getcpu.h> #include <linux/task_io_accounting_ops.h> +#include <linux/cpu.h> #include <linux/compat.h> #include <linux/syscalls.h> @@ -865,6 +866,7 @@ EXPORT_SYMBOL_GPL(kernel_halt); void kernel_power_off(void) { kernel_shutdown_prepare(SYSTEM_POWER_OFF); + disable_nonboot_cpus(); printk(KERN_EMERG "Power down.\n"); machine_power_off(); } |