linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 1/2] PM: add TEST_PLATFORM support for freeze state
@ 2013-03-27  3:36 Zhang Rui
  2013-03-27  3:36 ` [PATCH RESEND 2/2] PM: invalidate TEST_CPUS and TEST_CORE " Zhang Rui
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang Rui @ 2013-03-27  3:36 UTC (permalink / raw)
  To: rjw; +Cc: linux-pm, Zhang Rui

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>
---
 kernel/power/suspend.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index d4feda0..5eb30aa 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;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH RESEND 1/2] PM: add TEST_PLATFORM support for freeze state
@ 2013-03-12  1:21 Zhang Rui
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang Rui @ 2013-03-12  1:21 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux PM list, Kristen Carlson Accardi

>From 148f7df1678d8b017bff32197c8ef378dbd97531 Mon Sep 17 00:00:00 2001
From: Zhang Rui <rui.zhang@intel.com>
Date: Tue, 12 Mar 2013 08:43:11 +0800
Subject: [PATCH RESEND 1/2] PM: 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>
---
 kernel/power/suspend.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index d4feda0..5eb30aa 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;
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-27  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27  3:36 [PATCH RESEND 1/2] PM: add TEST_PLATFORM support for freeze state Zhang Rui
2013-03-27  3:36 ` [PATCH RESEND 2/2] PM: invalidate TEST_CPUS and TEST_CORE " Zhang Rui
  -- strict thread matches above, loose matches on Subject: below --
2013-03-12  1:21 [PATCH RESEND 1/2] PM: add TEST_PLATFORM " Zhang Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).