From: Nigel Cunningham <nigel@suspend2.net>
To: linux-kernel@vger.kernel.org
Subject: [Suspend2][ 04/19] [Suspend2] Reset modules after invalidating an image.
Date: Tue, 27 Jun 2006 08:36:12 +1000 [thread overview]
Message-ID: <20060626223610.4219.99290.stgit@nigel.suspend2.net> (raw)
In-Reply-To: <20060626223557.4219.53030.stgit@nigel.suspend2.net>
Reset modules after using them to read an image header and invalidate it,
when the user puts noresume2 on the command line.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/io.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/kernel/power/io.c b/kernel/power/io.c
index bfe4468..5c0acdd 100644
--- a/kernel/power/io.c
+++ b/kernel/power/io.c
@@ -111,3 +111,23 @@ void attempt_to_parse_resume_device2(voi
suspend_cleanup_usm();
}
+/* noresume_reset_modules
+ *
+ * Description: When we read the start of an image, modules (and especially the
+ * active writer) might need to reset data structures if we decide
+ * to invalidate the image rather than resuming from it.
+ */
+
+static void noresume_reset_modules(void)
+{
+ struct suspend_module_ops *this_filter;
+
+ list_for_each_entry(this_filter, &suspend_filters, type_list) {
+ if (this_filter->noresume_reset)
+ this_filter->noresume_reset();
+ }
+
+ if (suspend_active_writer && suspend_active_writer->noresume_reset)
+ suspend_active_writer->noresume_reset();
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
next prev parent reply other threads:[~2006-06-26 23:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-26 22:35 [Suspend2][ 00/19] Highlevel I/O routines Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 01/19] [Suspend2] Core io.c header Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 02/19] [Suspend2] Attempt to parse resume device Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 03/19] [Suspend2] Attempt to parse resume device (wrapped) Nigel Cunningham
2006-06-26 22:36 ` Nigel Cunningham [this message]
2006-06-26 22:36 ` [Suspend2][ 05/19] [Suspend2] Fill the suspend header fields Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 06/19] [Suspend2] Initialise modules before doing I/O Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 07/19] [Suspend2] Cleanup modules after doing I/O on a portion of the image Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 08/19] [Suspend2] I/O main loop Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 09/19] [Suspend2] Write a pageset Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 10/19] [Suspend2] Read a portion of the image from storage Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 11/19] [Suspend2] Write module configurations in an image header Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 12/19] [Suspend2] Read module configs from " Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 13/19] [Suspend2] Write " Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 14/19] [Suspend2] Sanity check " Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 15/19] [Suspend2] Core of code for reading pageset1 Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 16/19] [Suspend2] Read pageset1 Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 17/19] [Suspend2] Get image_exists data Nigel Cunningham
2006-06-26 22:36 ` [Suspend2][ 18/19] [Suspend2] Read pageset2 Nigel Cunningham
2006-06-26 22:37 ` [Suspend2][ 19/19] [Suspend2] I/O header file Nigel Cunningham
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=20060626223610.4219.99290.stgit@nigel.suspend2.net \
--to=nigel@suspend2.net \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome