diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-06 01:24:14 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-06 01:24:14 +0300 |
commit | ca935f8e769c3e36e1b6339cc527a25c49f4d624 (patch) | |
tree | 6c6e0bb614e5ad3054b9c8a9e4eecfbbf8525eb0 /kernel | |
parent | 9e66317d3c92ddaab330c125dfe9d06eee268aff (diff) | |
parent | 87cbde8d9081b91df86a21d0d743cd700e04890a (diff) | |
download | linux-ca935f8e769c3e36e1b6339cc527a25c49f4d624.tar.xz |
Merge branch 'pm-sleep'
* pm-sleep:
PM / s2idle: Invoke the ->wake() platform callback earlier
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/suspend.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 3e2b4f519009..ccd2d20e6b06 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -120,22 +120,26 @@ static void s2idle_loop(void) * frozen processes + suspended devices + idle processors. * Thus s2idle_enter() should be called right after * all devices have been suspended. + * + * Wakeups during the noirq suspend of devices may be spurious, + * so prevent them from terminating the loop right away. */ error = dpm_noirq_suspend_devices(PMSG_SUSPEND); if (!error) s2idle_enter(); + else if (error == -EBUSY && pm_wakeup_pending()) + error = 0; - dpm_noirq_resume_devices(PMSG_RESUME); - if (error && (error != -EBUSY || !pm_wakeup_pending())) { - dpm_noirq_end(); - break; - } - - if (s2idle_ops && s2idle_ops->wake) + if (!error && s2idle_ops && s2idle_ops->wake) s2idle_ops->wake(); + dpm_noirq_resume_devices(PMSG_RESUME); + dpm_noirq_end(); + if (error) + break; + if (s2idle_ops && s2idle_ops->sync) s2idle_ops->sync(); |