diff options
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index e13e74067845..d72234942798 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
20 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
21 | #include <linux/cpu.h> | ||
21 | 22 | ||
22 | #include "power.h" | 23 | #include "power.h" |
23 | 24 | ||
@@ -72,7 +73,10 @@ static int prepare_processes(void) | |||
72 | int error; | 73 | int error; |
73 | 74 | ||
74 | pm_prepare_console(); | 75 | pm_prepare_console(); |
75 | disable_nonboot_cpus(); | 76 | |
77 | error = disable_nonboot_cpus(); | ||
78 | if (error) | ||
79 | goto enable_cpus; | ||
76 | 80 | ||
77 | if (freeze_processes()) { | 81 | if (freeze_processes()) { |
78 | error = -EBUSY; | 82 | error = -EBUSY; |
@@ -84,6 +88,7 @@ static int prepare_processes(void) | |||
84 | return 0; | 88 | return 0; |
85 | thaw: | 89 | thaw: |
86 | thaw_processes(); | 90 | thaw_processes(); |
91 | enable_cpus: | ||
87 | enable_nonboot_cpus(); | 92 | enable_nonboot_cpus(); |
88 | pm_restore_console(); | 93 | pm_restore_console(); |
89 | return error; | 94 | return error; |
@@ -98,7 +103,7 @@ static void unprepare_processes(void) | |||
98 | } | 103 | } |
99 | 104 | ||
100 | /** | 105 | /** |
101 | * pm_suspend_disk - The granpappy of power management. | 106 | * pm_suspend_disk - The granpappy of hibernation power management. |
102 | * | 107 | * |
103 | * If we're going through the firmware, then get it over with quickly. | 108 | * If we're going through the firmware, then get it over with quickly. |
104 | * | 109 | * |
@@ -207,7 +212,7 @@ static int software_resume(void) | |||
207 | 212 | ||
208 | pr_debug("PM: Preparing devices for restore.\n"); | 213 | pr_debug("PM: Preparing devices for restore.\n"); |
209 | 214 | ||
210 | if ((error = device_suspend(PMSG_FREEZE))) { | 215 | if ((error = device_suspend(PMSG_PRETHAW))) { |
211 | printk("Some devices failed to suspend\n"); | 216 | printk("Some devices failed to suspend\n"); |
212 | swsusp_free(); | 217 | swsusp_free(); |
213 | goto Thaw; | 218 | goto Thaw; |