mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nigel Cunningham <nigel@suspend2.net>
To: linux-kernel@vger.kernel.org
Subject: [Suspend2][ 01/10] [Suspend2] Atomic copy file header.
Date: Tue, 27 Jun 2006 14:38:50 +1000	[thread overview]
Message-ID: <20060627043848.14546.41152.stgit@nigel.suspend2.net> (raw)
In-Reply-To: <20060627043846.14546.75810.stgit@nigel.suspend2.net>

Add the header for the atomic copy file. This file contains the routines
related to doing the copying and restoration of pages that need to be
atomically copied.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

 kernel/power/atomic_copy.c |   52 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/kernel/power/atomic_copy.c b/kernel/power/atomic_copy.c
new file mode 100644
index 0000000..e54de43
--- /dev/null
+++ b/kernel/power/atomic_copy.c
@@ -0,0 +1,52 @@
+/*
+ * kernel/power/atomic_copy.c
+ *
+ * Copyright 2004-2006 Nigel Cunningham <nigel@suspend2.net>
+ *
+ * Distributed under GPLv2.
+ *
+ * Routines for doing the atomic save/restore.
+ */
+
+#include <linux/suspend.h>
+#include <linux/highmem.h>
+#include <linux/bootmem.h>
+#include <asm/setup.h>
+#include "suspend2_common.h"
+#include "storage.h"
+#include "power_off.h"
+#include "version.h"
+#include "ui.h"
+#include "power.h"
+#include "io.h"
+#include "prepare_image.h"
+#include "pageflags.h"
+#include "extent.h"
+
+static int state1 __nosavedata = 0;
+static int state2 __nosavedata = 0;
+static int state3 __nosavedata = 0;
+static int io_speed_save[2][2] __nosavedata;
+__nosavedata char suspend_resume_commandline[COMMAND_LINE_SIZE];
+
+extern void suspend_power_down(void);
+extern int swsusp_resume(void);
+extern int suspend2_in_suspend __nosavedata;
+int extra_pd1_pages_used;
+
+#ifdef CONFIG_HIGHMEM
+static dyn_pageflags_t __nosavedata origmap;
+static dyn_pageflags_t __nosavedata copymap;
+static unsigned long __nosavedata origoffset;
+static unsigned long __nosavedata copyoffset;
+static __nosavedata int o_zone_num, c_zone_num;
+
+struct zone_data {
+	unsigned long start_pfn;
+	unsigned long end_pfn;
+	int is_highmem;
+};
+
+static __nosavedata struct zone_data *zone_nosave;
+static __nosavedata int num_zones;
+

--
Nigel Cunningham		nigel at suspend2 dot net

  reply	other threads:[~2006-06-27  5:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27  4:38 [Suspend2][ 00/10] Suspend2 Atomic Copy Patches Nigel Cunningham
2006-06-27  4:38 ` Nigel Cunningham [this message]
2006-06-27  4:38 ` [Suspend2][ 02/10] [Suspend2] Initialise nosave zone table Nigel Cunningham
2006-06-27  4:38 ` [Suspend2][ 03/10] [Suspend2] Atomic copy get_next_bit_on routine Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 04/10] [Suspend2] Prepare pbe list for atomic restore Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 05/10] [Suspend2] Highmem copyback routine Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 06/10] [Suspend2] Post-atomic restore routine Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 07/10] [Suspend2] Post suspend context-save routine Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 08/10] [Suspend2] Atomic copy routine Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 09/10] [Suspend2] Atomic copy highlevel routine Nigel Cunningham
2006-06-27  4:39 ` [Suspend2][ 10/10] [Suspend2] Atomic restore " 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=20060627043848.14546.41152.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

all inboxes | Powered by JetHome®