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.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index abef759de7c8..c8c272df7154 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -14,7 +14,6 @@
14 14
15#include <linux/export.h> 15#include <linux/export.h>
16#include <linux/suspend.h> 16#include <linux/suspend.h>
17#include <linux/syscalls.h>
18#include <linux/reboot.h> 17#include <linux/reboot.h>
19#include <linux/string.h> 18#include <linux/string.h>
20#include <linux/device.h> 19#include <linux/device.h>
@@ -281,7 +280,7 @@ static int create_image(int platform_mode)
281 if (error || hibernation_test(TEST_PLATFORM)) 280 if (error || hibernation_test(TEST_PLATFORM))
282 goto Platform_finish; 281 goto Platform_finish;
283 282
284 error = disable_nonboot_cpus(); 283 error = suspend_disable_secondary_cpus();
285 if (error || hibernation_test(TEST_CPUS)) 284 if (error || hibernation_test(TEST_CPUS))
286 goto Enable_cpus; 285 goto Enable_cpus;
287 286
@@ -323,7 +322,7 @@ static int create_image(int platform_mode)
323 local_irq_enable(); 322 local_irq_enable();
324 323
325 Enable_cpus: 324 Enable_cpus:
326 enable_nonboot_cpus(); 325 suspend_enable_secondary_cpus();
327 326
328 Platform_finish: 327 Platform_finish:
329 platform_finish(platform_mode); 328 platform_finish(platform_mode);
@@ -417,7 +416,7 @@ int hibernation_snapshot(int platform_mode)
417 416
418int __weak hibernate_resume_nonboot_cpu_disable(void) 417int __weak hibernate_resume_nonboot_cpu_disable(void)
419{ 418{
420 return disable_nonboot_cpus(); 419 return suspend_disable_secondary_cpus();
421} 420}
422 421
423/** 422/**
@@ -486,7 +485,7 @@ static int resume_target_kernel(bool platform_mode)
486 local_irq_enable(); 485 local_irq_enable();
487 486
488 Enable_cpus: 487 Enable_cpus:
489 enable_nonboot_cpus(); 488 suspend_enable_secondary_cpus();
490 489
491 Cleanup: 490 Cleanup:
492 platform_restore_cleanup(platform_mode); 491 platform_restore_cleanup(platform_mode);
@@ -564,7 +563,7 @@ int hibernation_platform_enter(void)
564 if (error) 563 if (error)
565 goto Platform_finish; 564 goto Platform_finish;
566 565
567 error = disable_nonboot_cpus(); 566 error = suspend_disable_secondary_cpus();
568 if (error) 567 if (error)
569 goto Enable_cpus; 568 goto Enable_cpus;
570 569
@@ -586,7 +585,7 @@ int hibernation_platform_enter(void)
586 local_irq_enable(); 585 local_irq_enable();
587 586
588 Enable_cpus: 587 Enable_cpus:
589 enable_nonboot_cpus(); 588 suspend_enable_secondary_cpus();
590 589
591 Platform_finish: 590 Platform_finish:
592 hibernation_ops->finish(); 591 hibernation_ops->finish();
@@ -709,9 +708,7 @@ int hibernate(void)
709 goto Exit; 708 goto Exit;
710 } 709 }
711 710
712 pr_info("Syncing filesystems ... \n"); 711 ksys_sync_helper();
713 ksys_sync();
714 pr_info("done.\n");
715 712
716 error = freeze_processes(); 713 error = freeze_processes();
717 if (error) 714 if (error)