From: Adam K. <ad...@bo...> - 2003-10-31 20:27:39
|
On Fri, Oct 31, 2003 at 12:09:05PM +0100, Ducrot Bruno wrote: > > I am using force=acpi as required since I have an older BIOS. Apparently > You mean acpi=force, correct? Yes, typo. > Could you please test this patch? > The problem being that we power down some devices twice. Yes, this patch fixes the problem 100%. Thanks. > --- linux-2.4.23-pre9/drivers/acpi/system.c 2003/10/31 08:09:10 1.1 > +++ linux-2.4.23-pre9/drivers/acpi/system.c 2003/10/31 10:36:35 > @@ -31,6 +31,7 @@ > #include <linux/spinlock.h> > #include <linux/poll.h> > #include <linux/delay.h> > +#include <linux/interrupt.h> > #include <linux/sysrq.h> > #include <linux/compatmac.h> > #include <linux/proc_fs.h> > @@ -92,7 +93,13 @@ > static void > acpi_power_off (void) > { > - acpi_suspend(ACPI_STATE_S5); > + if (unlikely(in_interrupt())) > + BUG(); > + acpi_enter_sleep_state_prep(ACPI_STATE_S5); > + ACPI_DISABLE_IRQS(); > + acpi_enter_sleep_state(ACPI_STATE_S5); > + > + printk(KERN_EMERG "ACPI: can not power off machine\n"); > } > > #endif /*CONFIG_PM*/ -- Adam Kessel http://bostoncoop.net/adam |