From: Mark Lord Date: Mon, 1 Oct 2007 08:20:10 +0000 (-0700) Subject: Fix SMP poweroff hangs X-Git-Tag: v2.6.22.10~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=433d028c427f90a2ab38b6eab752e19cd1ac9981;p=thirdparty%2Fkernel%2Fstable.git 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 Acked-by: Thomas Gleixner Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/sys.c b/kernel/sys.c index 28e8364ad68a2..afd9b93069f95 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -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(); }