Merge branch 'pm-x86'
[linux-2.6-microblaze.git] / kernel / power / hibernate.c
index c8c272d..356bcc9 100644 (file)
@@ -129,7 +129,7 @@ static int hibernation_test(int level) { return 0; }
 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 @@ 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);
 
@@ -542,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;