提交 08605acc 编写于 作者: Z Zhang Rui 提交者: Rafael J. Wysocki

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: NZhang Rui <rui.zhang@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 d08d528d
...@@ -184,6 +184,9 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) ...@@ -184,6 +184,9 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
goto Platform_wake; goto Platform_wake;
} }
if (suspend_test(TEST_PLATFORM))
goto Platform_wake;
/* /*
* PM_SUSPEND_FREEZE equals * PM_SUSPEND_FREEZE equals
* frozen processes + suspended devices + idle processors. * frozen processes + suspended devices + idle processors.
...@@ -195,9 +198,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) ...@@ -195,9 +198,6 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
goto Platform_wake; goto Platform_wake;
} }
if (suspend_test(TEST_PLATFORM))
goto Platform_wake;
error = disable_nonboot_cpus(); error = disable_nonboot_cpus();
if (error || suspend_test(TEST_CPUS)) if (error || suspend_test(TEST_CPUS))
goto Enable_cpus; goto Enable_cpus;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册