diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2006-09-26 02:32:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:49:01 -0400 |
commit | 75534b50cc658e951bcb213c2763c81e9f7b0b48 (patch) | |
tree | 1686cfe1f88bb9cd8ce0d34477b2eaac83709703 | |
parent | dcbb5a54f6e3984efa24772394f2225b11495c55 (diff) |
[PATCH] Change the name of pagedir_nosave
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>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/power/swsusp.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/swsusp_32.S | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/suspend_asm.S | 2 | ||||
-rw-r--r-- | kernel/power/power.h | 2 | ||||
-rw-r--r-- | kernel/power/snapshot.c | 26 |
5 files changed, 18 insertions, 18 deletions
diff --git a/arch/i386/power/swsusp.S b/arch/i386/power/swsusp.S index c893b897217f..8a2b50a0aaad 100644 --- a/arch/i386/power/swsusp.S +++ b/arch/i386/power/swsusp.S | |||
@@ -32,7 +32,7 @@ ENTRY(swsusp_arch_resume) | |||
32 | movl $swsusp_pg_dir-__PAGE_OFFSET, %ecx | 32 | movl $swsusp_pg_dir-__PAGE_OFFSET, %ecx |
33 | movl %ecx, %cr3 | 33 | movl %ecx, %cr3 |
34 | 34 | ||
35 | movl pagedir_nosave, %edx | 35 | movl restore_pblist, %edx |
36 | .p2align 4,,7 | 36 | .p2align 4,,7 |
37 | 37 | ||
38 | copy_loop: | 38 | copy_loop: |
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S index 7369f9a6ad25..69e8f86aa4f8 100644 --- a/arch/powerpc/kernel/swsusp_32.S +++ b/arch/powerpc/kernel/swsusp_32.S | |||
@@ -159,8 +159,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
159 | isync | 159 | isync |
160 | 160 | ||
161 | /* Load ptr the list of pages to copy in r3 */ | 161 | /* Load ptr the list of pages to copy in r3 */ |
162 | lis r11,(pagedir_nosave - KERNELBASE)@h | 162 | lis r11,(restore_pblist - KERNELBASE)@h |
163 | ori r11,r11,pagedir_nosave@l | 163 | ori r11,r11,restore_pblist@l |
164 | lwz r10,0(r11) | 164 | lwz r10,0(r11) |
165 | 165 | ||
166 | /* Copy the pages. This is a very basic implementation, to | 166 | /* Copy the pages. This is a very basic implementation, to |
diff --git a/arch/x86_64/kernel/suspend_asm.S b/arch/x86_64/kernel/suspend_asm.S index 320b6fb00cca..bfbe00763c68 100644 --- a/arch/x86_64/kernel/suspend_asm.S +++ b/arch/x86_64/kernel/suspend_asm.S | |||
@@ -54,7 +54,7 @@ ENTRY(restore_image) | |||
54 | movq %rcx, %cr3; | 54 | movq %rcx, %cr3; |
55 | movq %rax, %cr4; # turn PGE back on | 55 | movq %rax, %cr4; # turn PGE back on |
56 | 56 | ||
57 | movq pagedir_nosave(%rip), %rdx | 57 | movq restore_pblist(%rip), %rdx |
58 | loop: | 58 | loop: |
59 | testq %rdx, %rdx | 59 | testq %rdx, %rdx |
60 | jz done | 60 | jz done |
diff --git a/kernel/power/power.h b/kernel/power/power.h index 1cefcf87a694..e18ba207e784 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -38,8 +38,6 @@ extern struct subsystem power_subsys; | |||
38 | /* References to section boundaries */ | 38 | /* References to section boundaries */ |
39 | extern const void __nosave_begin, __nosave_end; | 39 | extern const void __nosave_begin, __nosave_end; |
40 | 40 | ||
41 | extern struct pbe *pagedir_nosave; | ||
42 | |||
43 | /* Preferred image size in bytes (default 500 MB) */ | 41 | /* Preferred image size in bytes (default 500 MB) */ |
44 | extern unsigned long image_size; | 42 | extern unsigned long image_size; |
45 | extern int in_suspend; | 43 | extern int in_suspend; |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 4ca372f2bc14..1d276b3ae152 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -34,7 +34,9 @@ | |||
34 | 34 | ||
35 | #include "power.h" | 35 | #include "power.h" |
36 | 36 | ||
37 | struct pbe *pagedir_nosave; | 37 | /* List of PBEs used for creating and restoring the suspend image */ |
38 | struct pbe *restore_pblist; | ||
39 | |||
38 | static unsigned int nr_copy_pages; | 40 | static unsigned int nr_copy_pages; |
39 | static unsigned int nr_meta_pages; | 41 | static unsigned int nr_meta_pages; |
40 | static unsigned long *buffer; | 42 | static unsigned long *buffer; |
@@ -415,7 +417,7 @@ void swsusp_free(void) | |||
415 | } | 417 | } |
416 | nr_copy_pages = 0; | 418 | nr_copy_pages = 0; |
417 | nr_meta_pages = 0; | 419 | nr_meta_pages = 0; |
418 | pagedir_nosave = NULL; | 420 | restore_pblist = NULL; |
419 | buffer = NULL; | 421 | buffer = NULL; |
420 | } | 422 | } |
421 | 423 | ||
@@ -490,15 +492,15 @@ asmlinkage int swsusp_save(void) | |||
490 | return -ENOMEM; | 492 | return -ENOMEM; |
491 | } | 493 | } |
492 | 494 | ||
493 | pagedir_nosave = swsusp_alloc(nr_pages); | 495 | restore_pblist = swsusp_alloc(nr_pages); |
494 | if (!pagedir_nosave) | 496 | if (!restore_pblist) |
495 | return -ENOMEM; | 497 | return -ENOMEM; |
496 | 498 | ||
497 | /* During allocating of suspend pagedir, new cold pages may appear. | 499 | /* During allocating of suspend pagedir, new cold pages may appear. |
498 | * Kill them. | 500 | * Kill them. |
499 | */ | 501 | */ |
500 | drain_local_pages(); | 502 | drain_local_pages(); |
501 | copy_data_pages(pagedir_nosave); | 503 | copy_data_pages(restore_pblist); |
502 | 504 | ||
503 | /* | 505 | /* |
504 | * End of critical section. From now on, we can write to memory, | 506 | * End of critical section. From now on, we can write to memory, |
@@ -580,13 +582,13 @@ int snapshot_read_next(struct snapshot_handle *handle, size_t count) | |||
580 | if (!handle->offset) { | 582 | if (!handle->offset) { |
581 | init_header((struct swsusp_info *)buffer); | 583 | init_header((struct swsusp_info *)buffer); |
582 | handle->buffer = buffer; | 584 | handle->buffer = buffer; |
583 | handle->pbe = pagedir_nosave; | 585 | handle->pbe = restore_pblist; |
584 | } | 586 | } |
585 | if (handle->prev < handle->cur) { | 587 | if (handle->prev < handle->cur) { |
586 | if (handle->cur <= nr_meta_pages) { | 588 | if (handle->cur <= nr_meta_pages) { |
587 | handle->pbe = pack_orig_addresses(buffer, handle->pbe); | 589 | handle->pbe = pack_orig_addresses(buffer, handle->pbe); |
588 | if (!handle->pbe) | 590 | if (!handle->pbe) |
589 | handle->pbe = pagedir_nosave; | 591 | handle->pbe = restore_pblist; |
590 | } else { | 592 | } else { |
591 | handle->buffer = (void *)handle->pbe->address; | 593 | handle->buffer = (void *)handle->pbe->address; |
592 | handle->pbe = handle->pbe->next; | 594 | handle->pbe = handle->pbe->next; |
@@ -689,7 +691,7 @@ static int load_header(struct snapshot_handle *handle, | |||
689 | pblist = alloc_pagedir(info->image_pages, GFP_ATOMIC, 0); | 691 | pblist = alloc_pagedir(info->image_pages, GFP_ATOMIC, 0); |
690 | if (!pblist) | 692 | if (!pblist) |
691 | return -ENOMEM; | 693 | return -ENOMEM; |
692 | pagedir_nosave = pblist; | 694 | restore_pblist = pblist; |
693 | handle->pbe = pblist; | 695 | handle->pbe = pblist; |
694 | nr_copy_pages = info->image_pages; | 696 | nr_copy_pages = info->image_pages; |
695 | nr_meta_pages = info->pages - info->image_pages - 1; | 697 | nr_meta_pages = info->pages - info->image_pages - 1; |
@@ -716,7 +718,7 @@ static inline struct pbe *unpack_orig_addresses(unsigned long *buf, | |||
716 | 718 | ||
717 | /** | 719 | /** |
718 | * prepare_image - use metadata contained in the PBE list | 720 | * prepare_image - use metadata contained in the PBE list |
719 | * pointed to by pagedir_nosave to mark the pages that will | 721 | * pointed to by restore_pblist to mark the pages that will |
720 | * be overwritten in the process of restoring the system | 722 | * be overwritten in the process of restoring the system |
721 | * memory state from the image ("unsafe" pages) and allocate | 723 | * memory state from the image ("unsafe" pages) and allocate |
722 | * memory for the image | 724 | * memory for the image |
@@ -741,7 +743,7 @@ static int prepare_image(struct snapshot_handle *handle) | |||
741 | unsigned int nr_pages = nr_copy_pages; | 743 | unsigned int nr_pages = nr_copy_pages; |
742 | struct pbe *p, *pblist = NULL; | 744 | struct pbe *p, *pblist = NULL; |
743 | 745 | ||
744 | p = pagedir_nosave; | 746 | p = restore_pblist; |
745 | error = mark_unsafe_pages(p); | 747 | error = mark_unsafe_pages(p); |
746 | if (!error) { | 748 | if (!error) { |
747 | pblist = alloc_pagedir(nr_pages, GFP_ATOMIC, 1); | 749 | pblist = alloc_pagedir(nr_pages, GFP_ATOMIC, 1); |
@@ -773,7 +775,7 @@ static int prepare_image(struct snapshot_handle *handle) | |||
773 | } | 775 | } |
774 | } | 776 | } |
775 | if (!error) { | 777 | if (!error) { |
776 | pagedir_nosave = pblist; | 778 | restore_pblist = pblist; |
777 | } else { | 779 | } else { |
778 | handle->pbe = NULL; | 780 | handle->pbe = NULL; |
779 | swsusp_free(); | 781 | swsusp_free(); |
@@ -858,7 +860,7 @@ int snapshot_write_next(struct snapshot_handle *handle, size_t count) | |||
858 | error = prepare_image(handle); | 860 | error = prepare_image(handle); |
859 | if (error) | 861 | if (error) |
860 | return error; | 862 | return error; |
861 | handle->pbe = pagedir_nosave; | 863 | handle->pbe = restore_pblist; |
862 | handle->last_pbe = NULL; | 864 | handle->last_pbe = NULL; |
863 | handle->buffer = get_buffer(handle); | 865 | handle->buffer = get_buffer(handle); |
864 | handle->sync_read = 0; | 866 | handle->sync_read = 0; |