aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/hibernate.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r--kernel/power/hibernate.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 33c79b6105c5..b26dbc48c75b 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -306,8 +306,10 @@ static int create_image(int platform_mode)
306 if (error) 306 if (error)
307 printk(KERN_ERR "PM: Error %d creating hibernation image\n", 307 printk(KERN_ERR "PM: Error %d creating hibernation image\n",
308 error); 308 error);
309 if (!in_suspend) 309 if (!in_suspend) {
310 events_check_enabled = false; 310 events_check_enabled = false;
311 clear_free_pages();
312 }
311 313
312 platform_leave(platform_mode); 314 platform_leave(platform_mode);
313 315
@@ -1189,22 +1191,6 @@ static int __init nohibernate_setup(char *str)
1189 return 1; 1191 return 1;
1190} 1192}
1191 1193
1192static int __init page_poison_nohibernate_setup(char *str)
1193{
1194#ifdef CONFIG_PAGE_POISONING_ZERO
1195 /*
1196 * The zeroing option for page poison skips the checks on alloc.
1197 * since hibernation doesn't save free pages there's no way to
1198 * guarantee the pages will still be zeroed.
1199 */
1200 if (!strcmp(str, "on")) {
1201 pr_info("Disabling hibernation due to page poisoning\n");
1202 return nohibernate_setup(str);
1203 }
1204#endif
1205 return 1;
1206}
1207
1208__setup("noresume", noresume_setup); 1194__setup("noresume", noresume_setup);
1209__setup("resume_offset=", resume_offset_setup); 1195__setup("resume_offset=", resume_offset_setup);
1210__setup("resume=", resume_setup); 1196__setup("resume=", resume_setup);
@@ -1212,4 +1198,3 @@ __setup("hibernate=", hibernate_setup);
1212__setup("resumewait", resumewait_setup); 1198__setup("resumewait", resumewait_setup);
1213__setup("resumedelay=", resumedelay_setup); 1199__setup("resumedelay=", resumedelay_setup);
1214__setup("nohibernate", nohibernate_setup); 1200__setup("nohibernate", nohibernate_setup);
1215__setup("page_poison=", page_poison_nohibernate_setup);