[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46FD5BAF.8040304@rtr.ca>
Date: Fri, 28 Sep 2007 15:53:19 -0400
From: Mark Lord <lkml@....ca>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>, Len Brown <lenb@...nel.org>,
Linux Kernel <linux-kernel@...r.kernel.org>,
simon.derr@...l.net, Andrew Morton <akpm@...l.org>
Subject: [PATCH] (repost) Fix SMP poweroff hangs
Rafael J. Wysocki wrote:
> ..
>> @@ -879,6 +880,7 @@
>> if (pm_power_off_prepare)
>> pm_power_off_prepare();
>> sysdev_shutdown();
>> + disable_nonboot_cpus();
>
> Before sysdev_shutdown(), please.
>
> sysdev_shutdown() may touch things that belong to CPU0.
Thanks. Here is the revised patch.
* * *
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@...ox.com>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
---
--- linux/kernel/sys.c.orig 2007-09-13 09:49:11.000000000 -0400
+++ linux/kernel/sys.c 2007-09-28 15:48:54.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/getcpu.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/seccomp.h>
+#include <linux/cpu.h>
#include <linux/compat.h>
#include <linux/syscalls.h>
@@ -878,6 +879,7 @@
kernel_shutdown_prepare(SYSTEM_POWER_OFF);
if (pm_power_off_prepare)
pm_power_off_prepare();
+ disable_nonboot_cpus();
sysdev_shutdown();
printk(KERN_EMERG "Power down.\n");
machine_power_off();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists