]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 11 Apr 2011 20:54:42 +0000 (22:54 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 11 Apr 2011 20:54:42 +0000 (22:54 +0200)
commit2890999b5b6140eca3848e127a846b25c6e81977
treee089e646c78701e37b4ebe00db36082e47cab2d5
parent57f052e64a92f1292647500fdce6ad3a369f8f16
PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS

Xen save/restore is going to use hibernate device callbacks for
quiescing devices and putting them back to normal operations and it
would need to select CONFIG_HIBERNATION for this purpose.  However,
that also would cause the hibernate interfaces for user space to be
enabled, which might confuse user space, because the Xen kernels
don't support hibernation.  Moreover, it would be wasteful, as it
would make the Xen kernels include a substantial amount of code that
they would never use.

To address this issue introduce new power management Kconfig option
CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
that is necessary for the hibernate device callbacks to work and make
CONFIG_HIBERNATION select it.  Then, Xen save/restore will be able to
select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
hibernate code along with it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
arch/powerpc/kernel/ibmebus.c
drivers/amba/bus.c
drivers/base/platform.c
drivers/base/power/main.c
drivers/pci/pci-driver.c
drivers/xen/manage.c
include/linux/suspend.h
kernel/power/Kconfig