diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/power/hibernate.c | 7 | ||||
| -rw-r--r-- | kernel/power/power.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 51441d87f0b6..5f3523e18e46 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
| @@ -409,6 +409,11 @@ int hibernation_snapshot(int platform_mode) | |||
| 409 | goto Close; | 409 | goto Close; |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | int __weak hibernate_resume_nonboot_cpu_disable(void) | ||
| 413 | { | ||
| 414 | return disable_nonboot_cpus(); | ||
| 415 | } | ||
| 416 | |||
| 412 | /** | 417 | /** |
| 413 | * resume_target_kernel - Restore system state from a hibernation image. | 418 | * resume_target_kernel - Restore system state from a hibernation image. |
| 414 | * @platform_mode: Whether or not to use the platform driver. | 419 | * @platform_mode: Whether or not to use the platform driver. |
| @@ -433,7 +438,7 @@ static int resume_target_kernel(bool platform_mode) | |||
| 433 | if (error) | 438 | if (error) |
| 434 | goto Cleanup; | 439 | goto Cleanup; |
| 435 | 440 | ||
| 436 | error = disable_nonboot_cpus(); | 441 | error = hibernate_resume_nonboot_cpu_disable(); |
| 437 | if (error) | 442 | if (error) |
| 438 | goto Enable_cpus; | 443 | goto Enable_cpus; |
| 439 | 444 | ||
diff --git a/kernel/power/power.h b/kernel/power/power.h index 064963e89194..242d8b827dd5 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
| @@ -38,6 +38,8 @@ static inline char *check_image_kernel(struct swsusp_info *info) | |||
| 38 | } | 38 | } |
| 39 | #endif /* CONFIG_ARCH_HIBERNATION_HEADER */ | 39 | #endif /* CONFIG_ARCH_HIBERNATION_HEADER */ |
| 40 | 40 | ||
| 41 | extern int hibernate_resume_nonboot_cpu_disable(void); | ||
| 42 | |||
| 41 | /* | 43 | /* |
| 42 | * Keep some memory free so that I/O operations can succeed without paging | 44 | * Keep some memory free so that I/O operations can succeed without paging |
| 43 | * [Might this be more than 4 MB?] | 45 | * [Might this be more than 4 MB?] |
