summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-06-07 10:48:57 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-06-07 10:48:57 +0200
commita964d23c94e8177c501fc9a37dcf1f0dd2750527 (patch)
tree0ed074be3f49c598167e3e134a0cc4f0f49b2ea6 /kernel/power
parentPM: sleep: Add kerneldoc comments to some functions (diff)
parentx86/power: Fix 'nosmt' vs hibernation triple fault during resume (diff)
downloadlinux-a964d23c94e8177c501fc9a37dcf1f0dd2750527.tar.xz
linux-a964d23c94e8177c501fc9a37dcf1f0dd2750527.zip
Merge branch 'pm-x86'
* pm-x86: x86/power: Fix 'nosmt' vs hibernation triple fault during resume x86: intel_epb: Do not build when CONFIG_PM is unset
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/hibernate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 97522630b1b6..356bcc925833 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -257,6 +257,11 @@ void swsusp_show_speed(ktime_t start, ktime_t stop,
(kps % 1000) / 10);
}
+__weak int arch_resume_nosmt(void)
+{
+ return 0;
+}
+
/**
* create_image - Create a hibernation image.
* @platform_mode: Whether or not to use the platform driver.
@@ -324,6 +329,10 @@ static int create_image(int platform_mode)
Enable_cpus:
suspend_enable_secondary_cpus();
+ /* Allow architectures to do nosmt-specific post-resume dances */
+ if (!in_suspend)
+ error = arch_resume_nosmt();
+
Platform_finish:
platform_finish(platform_mode);