]> Git Repo - linux.git/commitdiff
Merge branch 'pm-x86'
authorRafael J. Wysocki <[email protected]>
Fri, 7 Jun 2019 08:48:57 +0000 (10:48 +0200)
committerRafael J. Wysocki <[email protected]>
Fri, 7 Jun 2019 08:48:57 +0000 (10:48 +0200)
* pm-x86:
  x86/power: Fix 'nosmt' vs hibernation triple fault during resume
  x86: intel_epb: Do not build when CONFIG_PM is unset

1  2 
kernel/power/hibernate.c

diff --combined kernel/power/hibernate.c
index 97522630b1b627dbe7e0a243d9994a7b070db6ed,b65635753e8e44cc44f1d519842b2e18351b6361..356bcc925833b56b89aab6d571fb4ca2f9908b9f
@@@ -129,7 -129,7 +129,7 @@@ static int hibernation_test(int level) 
  static int platform_begin(int platform_mode)
  {
        return (platform_mode && hibernation_ops) ?
 -              hibernation_ops->begin() : 0;
 +              hibernation_ops->begin(PMSG_FREEZE) : 0;
  }
  
  /**
@@@ -257,6 -257,11 +257,11 @@@ void swsusp_show_speed(ktime_t start, k
                (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 +329,10 @@@ static int create_image(int platform_mo
   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);
  
@@@ -542,7 -551,7 +551,7 @@@ int hibernation_platform_enter(void
         * hibernation_ops->finish() before saving the image, so we should let
         * the firmware know that we're going to enter the sleep state after all
         */
 -      error = hibernation_ops->begin();
 +      error = hibernation_ops->begin(PMSG_HIBERNATE);
        if (error)
                goto Close;
  
This page took 0.0701000000000001 seconds and 4 git commands to generate.