summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2013-03-27 07:36:10 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-05 16:18:25 +0400
commit08605acc7e3b7974e309d73ddf39ee9464d95e51 (patch)
treee187c794901d5a477a31bb632d74c63774cac88a /kernel/power
parentd08d528dc1848fb369a0b27cdb0749d8f6f38063 (diff)
downloadlinux-08605acc7e3b7974e309d73ddf39ee9464d95e51.tar.xz
PM / sleep: add TEST_PLATFORM support for freeze state
Invoke freeze_enter() after suspend_test(TEST_PLATFORM) being invoked. So when setting /sys/power/pm_test to "platform", it can be used to check if freeze state is working well after all devices are suspended and before processors are blocked, Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/suspend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index d4feda084a3a..5eb30aab9b99 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -184,6 +184,9 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
goto Platform_wake;
}
+ if (suspend_test(TEST_PLATFORM))
+ goto Platform_wake;
+
/*
* PM_SUSPEND_FREEZE equals
* frozen processes + suspended devices + idle processors.
@@ -195,9 +198,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
goto Platform_wake;
}
- if (suspend_test(TEST_PLATFORM))
- goto Platform_wake;
-
error = disable_nonboot_cpus();
if (error || suspend_test(TEST_CPUS))
goto Enable_cpus;