The patch titled Hibernation: prepare to enter the low power state has been added to the -mm tree. Its filename is hibernation-prepare-to-enter-the-low-power-state.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Hibernation: prepare to enter the low power state From: Rafael J. Wysocki <rjw@xxxxxxx> During hibernation we call hibernation_ops->prepare() before creating the image, but then, before saving it, we cancel the power transition by calling hibernation_ops->finish(). Thus prior to calling hibernation_ops->enter() we should let the platform firmware know that we're going to enter the low power state after all. Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Cc: Gautham R Shenoy <ego@xxxxxxxxxx> Cc: Pavel Machek <pavel@xxxxxx> Cc: Nigel Cunningham <nigel@xxxxxxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/power/disk.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff -puN kernel/power/disk.c~hibernation-prepare-to-enter-the-low-power-state kernel/power/disk.c --- a/kernel/power/disk.c~hibernation-prepare-to-enter-the-low-power-state +++ a/kernel/power/disk.c @@ -205,12 +205,23 @@ int hibernation_restore(int platform_mod int hibernation_platform_enter(void) { + int error; + if (hibernation_ops) { kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); - return hibernation_ops->enter(); + /* + * We have cancelled the power transition by running + * hibernation_ops->finish() before saving the image, so we + * should let the firmware know that we're going to enter the + * sleep state after all + */ + error = hibernation_ops->prepare(); + if (!error) + error = hibernation_ops->enter(); } else { - return -ENOSYS; + error = -ENOSYS; } + return error; } /** _ Patches currently in -mm which might be from rjw@xxxxxxx are at91-fix-enable-disable_irq_wake-symmetry-in-pcmcia-driver.patch freezer-run-show_state-when-freezing-times-out.patch pm-do-not-require-dev-spew-to-get-pm_debug.patch swsusp-remove-incorrect-code-from-userc.patch swsusp-remove-code-duplication-between-diskc-and-userc.patch swsusp-introduce-restore-platform-operations.patch swsusp-fix-hibernation-code-ordering.patch hibernation-prepare-to-enter-the-low-power-state.patch freezer-avoid-freezing-kernel-threads-prematurely.patch add-suspend-related-notifications-for-cpu-hotplug-statistics.patch shrink_slab-handle-bad-shrinkers.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html