alistair23-linux/drivers
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
..
acorn
acpi swsusp: introduce restore platform operations 2007-07-19 10:04:42 -07:00
amba
ata [libata] sata_mv: use pci_try_set_mwi() 2007-07-17 16:18:00 -04:00
atm [ATM]: nicstar needs virt_to_bus 2007-07-18 02:13:42 -07:00
auxdisplay Use menuconfig objects II - auxdisplay 2007-07-16 09:05:40 -07:00
base PM: Do not require dev spew to get PM_DEBUG 2007-07-19 10:04:42 -07:00
block Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-07-18 10:23:37 -07:00
bluetooth
cdrom bsg: add a request_queue argument to scsi_cmd_ioctl() 2007-07-16 08:52:45 +02:00
char xen: use the hvc console infrastructure for Xen console 2007-07-18 08:47:44 -07:00
clocksource
connector Use menuconfig objects: connector 2007-07-16 09:05:40 -07:00
cpufreq [CPUFREQ] Restore previously used governor on a hot-replugged CPU 2007-07-13 01:29:51 -04:00
crypto Use menuconfig objects: crypto hw 2007-07-16 09:05:40 -07:00
dio
dma dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs 2007-07-16 09:05:45 -07:00
edac Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
eisa
fc4
firewire firewire: fw-sbp2: convert to new SCSI data buffer accessors 2007-07-18 23:53:28 +02:00
firmware edd: switch to pci_get based API 2007-07-16 09:05:42 -07:00
hid
hwmon SPI: add 3wire mode flag 2007-07-17 10:23:04 -07:00
i2c OMAP: add TI TWL92330/Menelaus Power Management chip driver 2007-07-17 10:23:15 -07:00
ide Revert drivers/ide/ide.c scsi_cmd_ioctl() usage changes 2007-07-17 15:57:42 -07:00
ieee1394 Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
infiniband IB/mthca: Simplify use of size0 in work request posting 2007-07-18 13:28:29 -07:00
input Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
isdn ISDN HiSax: uninitialized return in hisax_cs_setup 2007-07-18 18:17:23 -04:00
kvm KVM: Use CPU_DYING for disabling virtualization 2007-07-16 12:05:51 +03:00
leds
macintosh usermodehelper: Tidy up waiting 2007-07-18 08:47:40 -07:00
mca
md dm: fix memory leak in dm_create_persistent() when starting metadata update thread fails 2007-07-18 08:38:22 -07:00
media V4L/DVB (5847): Clean up schedule_timeout calls in cpia2 and ivtv code 2007-07-18 14:24:49 -03:00
message i2o debug output cleanup 2007-07-17 10:23:06 -07:00
mfd Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
misc IBMASM: must depend on CONFIG_INPUT 2007-07-17 10:23:04 -07:00
mmc Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
mtd UBI: fix compile warning 2007-07-18 16:59:17 +03:00
net Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2007-07-18 18:33:45 -07:00
nubus
oprofile
parisc serial: add early_serial_setup() back to header file 2007-07-18 08:38:22 -07:00
parport parport_pc: it887x fix 2007-07-16 09:05:50 -07:00
pci Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-07-16 17:58:08 -07:00
pcmcia PM: remove deprecated dpm_runtime_* routines 2007-07-18 15:49:49 -07:00
pnp usermodehelper: Tidy up waiting 2007-07-18 08:47:40 -07:00
power Merge git://git.infradead.org/battery-2.6 2007-07-15 16:56:12 -07:00
ps3
rapidio
rtc OMAP: add TI TWL92330/Menelaus Power Management chip driver 2007-07-17 10:23:15 -07:00
s390 Make the "z/VM unit record device driver" depend on S390 2007-07-17 15:43:56 -07:00
sbus Add common orderly_poweroff() 2007-07-18 08:47:40 -07:00
scsi Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
serial zs: move to the serial subsystem 2007-07-18 08:38:22 -07:00
sh
sn
spi use mutex instead of semaphore in SPI core/init code 2007-07-17 10:23:05 -07:00
tc zs: move to the serial subsystem 2007-07-18 08:38:22 -07:00
telephony drivers/telephony/ixj: cleanup and fix gcc warning 2007-07-17 16:18:00 -04:00
uio UIO: Hilscher CIF card driver 2007-07-18 15:57:16 -07:00
usb dev_vdbg(), available with -DVERBOSE_DEBUG 2007-07-18 15:49:50 -07:00
video fbdev: make fb_append_extra_logo() depend on fb=y 2007-07-18 08:38:22 -07:00
w1 Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
xen xen: add the Xenbus sysfs and virtual device hotplug driver 2007-07-18 08:47:45 -07:00
zorro
Kconfig UIO: Add the User IO core code 2007-07-18 15:57:15 -07:00
Makefile UIO: Add the User IO core code 2007-07-18 15:57:15 -07:00