From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM mailing list <linux-pm@lists.linux-foundation.org>
Cc: Frank Hofmann <frank.hofmann@tomtom.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-sh@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH 1/3] PM / Hibernate: Update some comments in core hibernate code
Date: Sat, 21 May 2011 12:09:33 +0000 [thread overview]
Message-ID: <201105211409.34012.rjw@sisk.pl> (raw)
In-Reply-To: <201105211408.28671.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Some comments in the core hibernate code are outdated, some aren't
necessary any more and at least one of them is plain wrong. Remove
those comments or update them.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/hibernate.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
Index: linux-2.6/kernel/power/hibernate.c
=================================--- linux-2.6.orig/kernel/power/hibernate.c
+++ linux-2.6/kernel/power/hibernate.c
@@ -248,12 +248,6 @@ static int create_image(int platform_mod
if (error)
return error;
- /* At this point, dpm_suspend_start() has been called, but *not*
- * dpm_suspend_noirq(). We *must* call dpm_suspend_noirq() now.
- * Otherwise, drivers for some devices (e.g. interrupt controllers)
- * become desynchronized with the actual state of the hardware
- * at resume time, and evil weirdness ensues.
- */
error = dpm_suspend_noirq(PMSG_FREEZE);
if (error) {
printk(KERN_ERR "PM: Some devices failed to power down, "
@@ -297,9 +291,6 @@ static int create_image(int platform_mod
Power_up:
syscore_resume();
- /* NOTE: dpm_resume_noirq() is just a resume() for devices
- * that suspended with irqs off ... no overall powerup.
- */
Enable_irqs:
local_irq_enable();
@@ -416,24 +407,26 @@ static int resume_target_kernel(bool pla
if (error)
goto Enable_irqs;
- /* We'll ignore saved state, but this gets preempt count (etc) right */
save_processor_state();
error = restore_highmem();
if (!error) {
error = swsusp_arch_resume();
/*
* The code below is only ever reached in case of a failure.
- * Otherwise execution continues at place where
- * swsusp_arch_suspend() was called
+ * Otherwise, execution continues at the place where
+ * swsusp_arch_suspend() was called.
*/
BUG_ON(!error);
- /* This call to restore_highmem() undos the previous one */
+ /*
+ * This call to restore_highmem() reverts the changes made by
+ * the previous one.
+ */
restore_highmem();
}
/*
* The only reason why swsusp_arch_resume() can fail is memory being
* very tight, so we have to free it as soon as we can to avoid
- * subsequent failures
+ * subsequent failures.
*/
swsusp_free();
restore_processor_state();
next prev parent reply other threads:[~2011-05-21 12:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-21 12:08 [PATCH 0/3] Hibernate cleanups Rafael J. Wysocki
2011-05-21 12:09 ` Rafael J. Wysocki [this message]
2011-05-21 12:10 ` [PATCH 2/3] PM / Hibernate: Remove arch_prepare_suspend() Rafael J. Wysocki
2011-06-02 3:14 ` Pavel Machek
2011-06-06 13:49 ` Ralf Baechle
2011-05-21 12:12 ` [PATCH 3/3] PM / Hibernate: Update kerneldoc comments in hibernate.c Rafael J. Wysocki
2011-05-23 3:08 ` Randy Dunlap
2011-05-23 21:11 ` Rafael J. Wysocki
2011-05-23 21:34 ` [PATCH 3/3] PM / Hibernate: Update kerneldoc comments in Randy Dunlap
2011-05-24 12:35 ` [PATCH 0/3] Hibernate cleanups Frank Hofmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201105211409.34012.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=benh@kernel.crashing.org \
--cc=frank.hofmann@tomtom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-sh@vger.kernel.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).