linux/kernel/power
Rafael J. Wysocki c7e0831d38 Hibernation: Check if ACPI is enabled during restore in the right place
The following scenario leads to total confusion of the platform firmware on
some boxes (eg. HPC nx6325):
* Hibernate with ACPI enabled
* Resume passing "acpi=off" to the boot kernel

To prevent this from happening it's necessary to check if ACPI is enabled (and
enable it if that's not the case) _right_ _after_ control has been transfered
from the boot kernel to the image kernel, before device_power_up() is called
(ie.  with interrupts disabled).   Enabling ACPI after calling
device_power_up() turns out to be insufficient.

For this reason, introduce new hibernation callback ->leave() that will be
executed before device_power_up() by the restored image kernel.   To make it
work, it also is necessary to move swsusp_suspend() from swsusp.c to disk.c
(it's name is changed to "create_image", which is more up to the point).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:20 -07:00
..
console.c [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode 2007-03-16 19:25:05 -07:00
disk.c Hibernation: Check if ACPI is enabled during restore in the right place 2007-10-18 14:37:20 -07:00
Kconfig serial: turn serial console suspend a boot rather than compile time option 2007-10-18 14:37:19 -07:00
main.c freezer: do not sync filesystems from freeze_processes 2007-10-18 14:37:18 -07:00
Makefile Introduce CONFIG_SUSPEND for suspend-to-Ram and standby 2007-07-29 16:45:38 -07:00
pm.c [PATCH] remove kernel/power/pm.c:pm_unregister_all() 2006-07-12 16:09:08 -07:00
power.h Hibernation: Check if ACPI is enabled during restore in the right place 2007-10-18 14:37:20 -07:00
poweroff.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
process.c freezer: measure freezing time 2007-10-18 14:37:19 -07:00
snapshot.c Hibernation: Arbitrary boot kernel support - generic code 2007-10-18 14:37:19 -07:00
swap.c swsusp: introduce restore platform operations 2007-07-19 10:04:42 -07:00
swsusp.c Hibernation: Check if ACPI is enabled during restore in the right place 2007-10-18 14:37:20 -07:00
user.c freezer: do not sync filesystems from freeze_processes 2007-10-18 14:37:18 -07:00