From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>, Linux PM <linux-pm@osdl.org>
Subject: [RFC][PATCH -mm 4/5] swsusp: Change the name of pagedir_nosave
Date: Wed, 9 Aug 2006 12:11:34 +0200 [thread overview]
Message-ID: <200608091211.34615.rjw@sisk.pl> (raw)
In-Reply-To: <200608091152.49094.rjw@sisk.pl>
The name of the pagedir_nosave variable does not make sense any more, so it
seems reasonable to change it to something more meaningful.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/i386/power/swsusp.S | 2 +-
arch/powerpc/kernel/swsusp_32.S | 4 ++--
arch/x86_64/kernel/suspend_asm.S | 2 +-
kernel/power/power.h | 2 --
kernel/power/snapshot.c | 15 +++++++++------
5 files changed, 13 insertions(+), 12 deletions(-)
Index: linux-2.6.18-rc3-mm2/arch/i386/power/swsusp.S
===================================================================
--- linux-2.6.18-rc3-mm2.orig/arch/i386/power/swsusp.S
+++ linux-2.6.18-rc3-mm2/arch/i386/power/swsusp.S
@@ -32,7 +32,7 @@ ENTRY(swsusp_arch_resume)
movl $swsusp_pg_dir-__PAGE_OFFSET, %ecx
movl %ecx, %cr3
- movl pagedir_nosave, %edx
+ movl restore_pblist, %edx
.p2align 4,,7
copy_loop:
Index: linux-2.6.18-rc3-mm2/arch/powerpc/kernel/swsusp_32.S
===================================================================
--- linux-2.6.18-rc3-mm2.orig/arch/powerpc/kernel/swsusp_32.S
+++ linux-2.6.18-rc3-mm2/arch/powerpc/kernel/swsusp_32.S
@@ -159,8 +159,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
isync
/* Load ptr the list of pages to copy in r3 */
- lis r11,(pagedir_nosave - KERNELBASE)@h
- ori r11,r11,pagedir_nosave@l
+ lis r11,(restore_pblist - KERNELBASE)@h
+ ori r11,r11,restore_pblist@l
lwz r10,0(r11)
/* Copy the pages. This is a very basic implementation, to
Index: linux-2.6.18-rc3-mm2/arch/x86_64/kernel/suspend_asm.S
===================================================================
--- linux-2.6.18-rc3-mm2.orig/arch/x86_64/kernel/suspend_asm.S
+++ linux-2.6.18-rc3-mm2/arch/x86_64/kernel/suspend_asm.S
@@ -54,7 +54,7 @@ ENTRY(restore_image)
movq %rcx, %cr3;
movq %rax, %cr4; # turn PGE back on
- movq pagedir_nosave(%rip), %rdx
+ movq restore_pblist(%rip), %rdx
loop:
testq %rdx, %rdx
jz done
Index: linux-2.6.18-rc3-mm2/kernel/power/power.h
===================================================================
--- linux-2.6.18-rc3-mm2.orig/kernel/power/power.h
+++ linux-2.6.18-rc3-mm2/kernel/power/power.h
@@ -38,8 +38,6 @@ extern struct subsystem power_subsys;
/* References to section boundaries */
extern const void __nosave_begin, __nosave_end;
-extern struct pbe *pagedir_nosave;
-
/* Preferred image size in bytes (default 500 MB) */
extern unsigned long image_size;
extern int in_suspend;
Index: linux-2.6.18-rc3-mm2/kernel/power/snapshot.c
===================================================================
--- linux-2.6.18-rc3-mm2.orig/kernel/power/snapshot.c
+++ linux-2.6.18-rc3-mm2/kernel/power/snapshot.c
@@ -38,8 +38,11 @@
* the suspend and included in the suspend image, but have also been
* allocated by the "resume" kernel, so their contents cannot be written
* directly to their "original" page frames.
+ *
+ * NOTE: It cannot be static, because it is used by the architecture-dependent
+ * atomic restore code.
*/
-struct pbe *pagedir_nosave;
+struct pbe *restore_pblist;
/* Pointer to an auxiliary buffer (1 page) */
static void *buffer;
@@ -824,7 +827,7 @@ void swsusp_free(void)
}
nr_copy_pages = 0;
nr_meta_pages = 0;
- pagedir_nosave = NULL;
+ restore_pblist = NULL;
buffer = NULL;
}
@@ -1203,7 +1206,7 @@ load_header(struct swsusp_info *info)
{
int error;
- pagedir_nosave = NULL;
+ restore_pblist = NULL;
error = check_header(info);
if (!error) {
nr_copy_pages = info->image_pages;
@@ -1562,8 +1565,8 @@ static void *get_buffer(struct memory_bi
pbe->orig_address = page_address(page);
pbe->address = safe_pages_list;
safe_pages_list = safe_pages_list->next;
- pbe->next = pagedir_nosave;
- pagedir_nosave = pbe;
+ pbe->next = restore_pblist;
+ restore_pblist = pbe;
return (void *)pbe->address;
}
@@ -1628,7 +1631,7 @@ int snapshot_write_next(struct snapshot_
chain_init(&ca, GFP_ATOMIC, 1);
bm_position_reset(&orig_bm);
- pagedir_nosave = NULL;
+ restore_pblist = NULL;
handle->sync_read = 0;
handle->buffer = get_buffer(&orig_bm, &ca);
if (!handle->buffer)
next prev parent reply other threads:[~2006-08-09 10:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 9:52 [RFC][PATCH -mm 0/5] swsusp: Fix handling of highmem Rafael J. Wysocki
2006-08-09 9:58 ` [RFC][PATCH -mm 1/5] swsusp: Introduce memory bitmaps Rafael J. Wysocki
2006-08-09 10:31 ` Pavel Machek
2006-08-09 10:57 ` Rafael J. Wysocki
2006-08-09 11:27 ` Pavel Machek
2006-08-09 11:36 ` Rafael J. Wysocki
2006-08-09 11:53 ` Pavel Machek
2006-08-09 12:11 ` Rafael J. Wysocki
2006-08-09 11:46 ` Pavel Machek
2006-08-09 12:02 ` Rafael J. Wysocki
2006-08-09 13:35 ` Pavel Machek
2006-08-09 10:04 ` [RFC][PATCH -mm 2/5] swsusp: Use memory bitmaps during resume Rafael J. Wysocki
2006-08-09 10:34 ` Pavel Machek
2006-08-09 11:04 ` Rafael J. Wysocki
2006-08-09 11:33 ` Pavel Machek
2006-08-09 11:51 ` Rafael J. Wysocki
2006-08-09 13:33 ` Pavel Machek
2006-08-09 11:49 ` Pavel Machek
2006-08-09 12:04 ` Rafael J. Wysocki
2006-08-09 12:10 ` Pavel Machek
2006-08-09 10:09 ` [RFC][PATCH -mm 3/5] swsusp: Fix handling of highmem Rafael J. Wysocki
2006-08-09 11:51 ` Pavel Machek
2006-08-09 12:07 ` Rafael J. Wysocki
2006-08-09 13:35 ` Pavel Machek
2006-08-09 10:11 ` Rafael J. Wysocki [this message]
2006-08-09 10:35 ` [RFC][PATCH -mm 4/5] swsusp: Change the name of pagedir_nosave Pavel Machek
2006-08-09 10:13 ` [RFC][PATCH -mm 5/5] swsusp: Introduce some helpful constants Rafael J. Wysocki
2006-08-09 10:36 ` Pavel Machek
2006-08-09 10:47 ` [RFC][PATCH -mm 0/5] swsusp: Fix handling of highmem Nigel Cunningham
2006-08-09 11:38 ` Pavel Machek
2006-08-09 11:52 ` Nigel Cunningham
2006-08-13 22:34 ` Pavel Machek
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=200608091211.34615.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@osdl.org \
--cc=pavel@ucw.cz \
/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