-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 4 Feb 2005, Andrew Morton wrote:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11-rc3/2.6.11-rc3-mm1/

Andrew,

Please add to -mm the patch in attachment, since it solves the old
acpi_power_off bug...

Best Regards,
Marcos Marado

- -- /* *************************************************************** */
Marcos Daniel Marado Torres AKA Mind Booster Noori
http://student.dei.uc.pt/~marado - [EMAIL PROTECTED]
() Join the ASCII ribbon campaign against html email, Microsoft
/\ attachments and Software patents. They endanger the World.
Sign a petition against patents: http://petition.eurolinux.org
/* *************************************************************** */
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.76


iD8DBQFCCYpxmNlq8m+oD34RAsJQAKDmBDtuPseiQkpSfZfiiCG05xDoOwCfZvKc
sQje5ivpItBbcTYqTP1gKvU=
=90/h
-----END PGP SIGNATURE-----
diff -Nru -p1 linux-2.6.11-rc2-mm1/drivers/acpi/sleep/poweroff.c 
linux-2.6.11-rc2-mm1-mbn1/drivers/acpi/sleep/poweroff.c
--- linux-2.6.11-rc2-mm1/drivers/acpi/sleep/poweroff.c  2004-12-24 
22:35:39.000000000 +0100
+++ linux-2.6.11-rc2-mm1-mbn1/drivers/acpi/sleep/poweroff.c     2005-01-26 
00:25:04.000000000 +0100
@@ -9,2 +9,3 @@
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <acpi/acpi_bus.h>
@@ -13,2 +14,20 @@
 
+static void 
+acpi_power_off_prepare(void)
+{
+       if (system_state == SYSTEM_POWER_OFF) {
+               acpi_wakeup_gpe_poweroff_prepare();
+               acpi_enter_sleep_state_prep(ACPI_STATE_S5);
+       }
+}
+
+void 
+do_acpi_power_off_prepare(void)
+{
+       if (!acpi_disabled) {
+               acpi_power_off_prepare();
+       }
+}
+                       
+
 static void
@@ -17,6 +36,6 @@ acpi_power_off (void)
        printk("%s called\n",__FUNCTION__);
+#if 0  /* This should be made redundant by other patches.. */
        /* Some SMP machines only can poweroff in boot CPU */
        set_cpus_allowed(current, cpumask_of_cpu(0));
-       acpi_wakeup_gpe_poweroff_prepare();
-       acpi_enter_sleep_state_prep(ACPI_STATE_S5);
+#endif
        ACPI_DISABLE_IRQS();
diff -Nru -p1 linux-2.6.11-rc2-mm1/drivers/base/power/shutdown.c 
linux-2.6.11-rc2-mm1-mbn1/drivers/base/power/shutdown.c
--- linux-2.6.11-rc2-mm1/drivers/base/power/shutdown.c  2004-12-24 
22:35:01.000000000 +0100
+++ linux-2.6.11-rc2-mm1-mbn1/drivers/base/power/shutdown.c     2005-01-26 
00:26:54.000000000 +0100
@@ -64,2 +64,9 @@ void device_shutdown(void)
 
+#if 1
+       {
+               extern void do_acpi_power_off_prepare(void);
+               do_acpi_power_off_prepare();
+       }
+#endif
+       
        sysdev_shutdown();

Reply via email to