aboutsummaryrefslogtreecommitdiff
path: root/kernel/power/swsusp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 18:41:00 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 18:41:00 -0700
commit3448097fccdce4ea8f0fcad4f37f502a8cd72e68 (patch)
tree583ee97128a9e2657d5bf73def841c460371804a /kernel/power/swsusp.c
parent5503967307f3fa443f5770a4df5ea4fbe9fb3917 (diff)
Revert "swsusp special saveable pages support" commits
This reverts commits 3e3318dee0878d42ed62a19c292a2ac284135db3 [PATCH] swsusp: x86_64 mark special saveable/unsaveable pages b6370d96e09944c6e3ae8d5743ca8a8ab1f79f6c [PATCH] swsusp: i386 mark special saveable/unsaveable pages ce4ab0012b32c1a4a1d6e934aeb73bf3151c48d9 [PATCH] swsusp: add architecture special saveable pages support because not only do they apparently cause page faults on x86, the infrastructure doesn't compile on powerpc. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r--kernel/power/swsusp.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index f0ee4e7780d..17f669c8301 100644
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -62,6 +62,16 @@ unsigned long image_size = 500 * 1024 * 1024;
int in_suspend __nosavedata = 0;
+#ifdef CONFIG_HIGHMEM
+unsigned int count_highmem_pages(void);
+int save_highmem(void);
+int restore_highmem(void);
+#else
+static inline int save_highmem(void) { return 0; }
+static inline int restore_highmem(void) { return 0; }
+static inline unsigned int count_highmem_pages(void) { return 0; }
+#endif
+
/**
* The following functions are used for tracing the allocated
* swap pages, so that they can be freed in case of an error.
@@ -182,7 +192,7 @@ int swsusp_shrink_memory(void)
printk("Shrinking memory... ");
do {
- size = 2 * count_special_pages();
+ size = 2 * count_highmem_pages();
size += size / 50 + count_data_pages();
size += (size + PBES_PER_PAGE - 1) / PBES_PER_PAGE +
PAGES_FOR_IO;
@@ -226,7 +236,7 @@ int swsusp_suspend(void)
goto Enable_irqs;
}
- if ((error = save_special_mem())) {
+ if ((error = save_highmem())) {
printk(KERN_ERR "swsusp: Not enough free pages for highmem\n");
goto Restore_highmem;
}
@@ -237,7 +247,7 @@ int swsusp_suspend(void)
/* Restore control flow magically appears here */
restore_processor_state();
Restore_highmem:
- restore_special_mem();
+ restore_highmem();
device_power_up();
Enable_irqs:
local_irq_enable();
@@ -263,7 +273,7 @@ int swsusp_resume(void)
*/
swsusp_free();
restore_processor_state();
- restore_special_mem();
+ restore_highmem();
touch_softlockup_watchdog();
device_power_up();
local_irq_enable();