# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/03/13 00:03:06-05:00 len.brown@intel.com 
#   [ACPI] SMP poweroff (David Shaohua Li)
#   http://bugzilla.kernel.org/show_bug.cgi?id=1141
# 
# drivers/acpi/sleep/poweroff.c
#   2004/03/13 00:02:10-05:00 len.brown@intel.com +3 -0
#   poweroff from CPU0 - David Shaohua Li
# 
diff -Nru a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
--- a/drivers/acpi/sleep/poweroff.c	Sat Mar 13 00:03:13 2004
+++ b/drivers/acpi/sleep/poweroff.c	Sat Mar 13 00:03:13 2004
@@ -8,11 +8,14 @@
 #include <linux/pm.h>
 #include <linux/init.h>
 #include <acpi/acpi_bus.h>
+#include <linux/sched.h>
 
 static void
 acpi_power_off (void)
 {
 	printk("%s called\n",__FUNCTION__);
+	/* Some SMP machines only can poweroff in boot CPU */
+	set_cpus_allowed(current, cpumask_of_cpu(0));
 	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
 	ACPI_DISABLE_IRQS();
 	acpi_enter_sleep_state(ACPI_STATE_S5);