* [PATCH] Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish
@ 2007-08-21 21:16 Rafael J. Wysocki
0 siblings, 0 replies; only message in thread
From: Rafael J. Wysocki @ 2007-08-21 21:16 UTC (permalink / raw)
To: Andrew Morton
Cc: Pavel Machek, ACPI Devel Maling List, Len Brown, pm list, LKML
From: Rafael J. Wysocki <rjw@sisk.pl>
If the BIOS does not enable ACPI and the "acpi=off" command line parameter is
passed to the boot kernel, ACPI may be disabled when the (restored) image kernel
attempts to execute acpi_hibernation_finish(). To prevent this from happening
we can call acpi_enable() from acpi_hibernation_finish() (if ACPI is already
enabled, this will have no effect).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
---
drivers/acpi/sleep/main.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6.23-rc3/drivers/acpi/sleep/main.c
===================================================================
--- linux-2.6.23-rc3.orig/drivers/acpi/sleep/main.c
+++ linux-2.6.23-rc3/drivers/acpi/sleep/main.c
@@ -240,6 +240,11 @@ static int acpi_hibernation_enter(void)
static void acpi_hibernation_finish(void)
{
+ /*
+ * If ACPI is not enabled by the BIOS and the boot kernel, we need to
+ * enable it here.
+ */
+ acpi_enable();
acpi_leave_sleep_state(ACPI_STATE_S4);
acpi_disable_wakeup_device(ACPI_STATE_S4);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-21 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-21 21:16 [PATCH] Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®