kernel-ark/drivers/acpi
Rafael J. Wysocki a634cc1016 swsusp: introduce restore platform operations
At least on some machines it is necessary to prepare the ACPI firmware for the
restoration of the system memory state from the hibernation image if the
"platform" mode of hibernation has been used.  Namely, in that cases we need
to disable the GPEs before replacing the "boot" kernel with the "frozen"
kernel (cf.  http://bugzilla.kernel.org/show_bug.cgi?id=7887).  After the
restore they will be re-enabled by hibernation_ops->finish(), but if the
restore fails, they have to be re-enabled by the restore code explicitly.

For this purpose we can introduce two additional hibernation operations,
called pre_restore() and restore_cleanup() and call them from the restore code
path.  Still, they should be called if the "platform" mode of hibernation has
been used, so we need to pass the information about the hibernation mode from
the "frozen" kernel to the "boot" kernel in the image header.

Apparently, we can't drop the disabling of GPEs before the restore because of
Bug #7887 .   We also can't do it unconditionally, because the GPEs wouldn't
have been enabled after a successful restore if the suspend had been done in
the 'shutdown' or 'reboot' mode.

In principle we could (and probably should) unconditionally disable the GPEs
before each snapshot creation *and* before the restore, but then we'd have to
unconditionally enable them after the snapshot creation as well as after the
restore (or restore failure)   Still, for this purpose we'd need to modify
acpi_enter_sleep_state_prep() and acpi_leave_sleep_state() and we'd have to
introduce some mechanism synchronizing the disablind/enabling of the GPEs with
the device drivers' .suspend()/.resume() routines and with
disable_/enable_nonboot_cpus().   However, this would have affected the
suspend (ie.  s2ram) code as well as the hibernation, which I'd like to avoid
in this patch series.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 10:04:42 -07:00
..
dispatcher ACPICA: Lindent 2007-05-09 23:34:35 -04:00
events ACPICA: Lindent 2007-05-09 23:34:35 -04:00
executer ACPICA: Lindent 2007-05-09 23:34:35 -04:00
hardware ACPICA: Lindent 2007-05-09 23:34:35 -04:00
namespace ACPICA: Lindent 2007-05-09 23:34:35 -04:00
parser ACPICA: Lindent 2007-05-09 23:34:35 -04:00
resources ACPICA: Lindent 2007-05-09 23:34:35 -04:00
sleep swsusp: introduce restore platform operations 2007-07-19 10:04:42 -07:00
tables ACPICA: allow Load(OEMx) tables 2007-05-29 18:29:50 -04:00
utilities ACPICA: fix error path in new external package objects as method arguments 2007-06-18 00:51:47 -04:00
ac.c
acpi_memhotplug.c ACPI: Remove duplicate definitions for _STA bits 2007-04-25 14:17:39 -04:00
asus_acpi.c asus_acpi: fix oops on non-asus machines 2007-07-01 12:29:44 -07:00
battery.c
bay.c
blacklist.c ACPI: make blacklist more verbose 2007-03-09 21:19:05 -05:00
bus.c ACPI: use _STA bit names rather than 0x0F 2007-04-25 14:20:58 -04:00
button.c
cm_sbs.c
container.c ACPI: Remove duplicate definitions for _STA bits 2007-04-25 14:17:39 -04:00
debug.c
dock.c ACPI: dock: use NULL for pointer 2007-03-28 23:31:43 -04:00
ec.c acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC commands 2007-05-10 03:52:22 -04:00
event.c
fan.c
glue.c workaround rtc-related acpi table bugs 2007-05-08 11:15:18 -07:00
Kconfig Pull sbs into release branch 2007-04-28 23:16:59 -04:00
Makefile Pull sbs into release branch 2007-04-28 23:16:59 -04:00
numa.c ACPI: Section mismatch ... acpi_map_pxm_to_node 2007-06-02 00:20:07 -04:00
osl.c ACPI: fix acpi_osi=!Linux 2007-07-02 21:06:48 -07:00
pci_bind.c
pci_irq.c
pci_link.c
pci_root.c
power.c Pull misc-for-upstream into release branch 2007-03-09 23:19:50 -05:00
processor_core.c PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
processor_idle.c ACPI: fix 2.6.20 SMP boot regression 2007-06-23 10:57:28 -04:00
processor_perflib.c [CPUFREQ] Remove deprecated /proc/acpi/processor/performance write support 2007-04-26 14:32:02 -04:00
processor_thermal.c
processor_throttling.c
sbs.c ACPI: sbs: Common interface with CM battery 2007-03-22 01:15:58 -04:00
scan.c PNPACPI sets pnpdev->dev.archdata 2007-05-08 11:15:08 -07:00
system.c
tables.c Revert "ACPI: parse 2nd MADT by default" 2007-03-30 14:16:10 -04:00
thermal.c Add common orderly_poweroff() 2007-07-18 08:47:40 -07:00
toshiba_acpi.c toshiba_acpi: fix section mismatch in allyesconfig 2007-06-16 13:16:15 -07:00
utils.c
video.c ACPI: video: Fix spelling and grammar mistakes 2007-03-09 21:37:07 -05:00