From: Frank Pan <frankpzh@gmail.com>
To: xen-devel@lists.xensource.com,
Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Ian Campbell <Ian.Campbell@eu.citrix.com>
Subject: [PATCH] pvops: Make suspend work when CONFIG_SUSPEND=n
Date: Fri, 4 Mar 2011 19:20:39 +0800 [thread overview]
Message-ID: <AANLkTikcbVEXdRsS1WYCNTinuYLcmiJ1dz2ReS18_A+3@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]
Recent pvops kernel fails on suspending some of devices on the
following configuration:
CONFIG_SUSPEND=n
CONFIG_PM_SLEEP=y
Command suspend on control/shutdown is recognized when
CONFIG_PM_SLEEP=y. This indicates the device suspend logic should also
be enabled on this configuration.
The following patch works.
---
linux-2.6-xen/drivers/base/power/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-2.6-xen/drivers/base/power/main.c
b/linux-2.6-xen/drivers/base/power/main.c
index 8aa2443..4d40fc4 100644
--- a/linux-2.6-xen/drivers/base/power/main.c
+++ b/linux-2.6-xen/drivers/base/power/main.c
@@ -174,7 +174,7 @@ static int pm_op(struct device *dev,
int error = 0;
switch (state.event) {
-#ifdef CONFIG_SUSPEND
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_XEN_SAVE_RESTORE)
case PM_EVENT_SUSPEND:
if (ops->suspend) {
error = ops->suspend(dev);
@@ -238,7 +238,7 @@ static int pm_noirq_op(struct device *dev,
int error = 0;
switch (state.event) {
-#ifdef CONFIG_SUSPEND
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_XEN_SAVE_RESTORE)
case PM_EVENT_SUSPEND:
if (ops->suspend_noirq) {
error = ops->suspend_noirq(dev);
--
1.7.0.4
--
潘震皓, Frank Pan
Computer Science and Technology
Tsinghua University
[-- Attachment #2: 0001-Make-suspend-work-when-CONFIG_SUSPEND-n.patch --]
[-- Type: text/x-patch, Size: 1407 bytes --]
From 941b7222efe8be20ea285f5325fbe46706c55464 Mon Sep 17 00:00:00 2001
From: Frank Pan <frankpzh@gmail.com>
Date: Fri, 4 Mar 2011 18:49:38 +0800
Subject: [PATCH] Make suspend work when CONFIG_SUSPEND=n
Recent pvops kernel fails on suspending some of devices on the following configuration:
CONFIG_SUSPEND=n
CONFIG_PM_SLEEP=y
Command suspend on control/shutdown is recognized when CONFIG_PM_SLEEP=y. This indicates the device suspend logic should also be enabled on this configuration.
The following patch works.
---
linux-2.6-xen/drivers/base/power/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-2.6-xen/drivers/base/power/main.c b/linux-2.6-xen/drivers/base/power/main.c
index 8aa2443..4d40fc4 100644
--- a/linux-2.6-xen/drivers/base/power/main.c
+++ b/linux-2.6-xen/drivers/base/power/main.c
@@ -174,7 +174,7 @@ static int pm_op(struct device *dev,
int error = 0;
switch (state.event) {
-#ifdef CONFIG_SUSPEND
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_XEN_SAVE_RESTORE)
case PM_EVENT_SUSPEND:
if (ops->suspend) {
error = ops->suspend(dev);
@@ -238,7 +238,7 @@ static int pm_noirq_op(struct device *dev,
int error = 0;
switch (state.event) {
-#ifdef CONFIG_SUSPEND
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_XEN_SAVE_RESTORE)
case PM_EVENT_SUSPEND:
if (ops->suspend_noirq) {
error = ops->suspend_noirq(dev);
--
1.7.0.4
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2011-03-04 11:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 11:20 Frank Pan [this message]
2011-03-04 11:35 ` [PATCH] pvops: Make suspend work when CONFIG_SUSPEND=n Ian Campbell
2011-03-04 11:45 ` Frank Pan
2011-03-04 11:52 ` Ian Campbell
2011-03-04 15:42 ` Shriram Rajagopalan
2011-03-04 15:56 ` Konrad Rzeszutek Wilk
2011-03-04 16:29 ` Shriram Rajagopalan
2011-03-04 18:26 ` Q: Clarification about extra option ..Re: " Konrad Rzeszutek Wilk
2011-03-04 19:49 ` Shriram Rajagopalan
2011-03-04 20:07 ` Rafael J. Wysocki
2011-03-06 20:31 ` Shriram Rajagopalan
2011-03-06 22:12 ` Rafael J. Wysocki
2011-03-07 12:44 ` Stefano Stabellini
2011-03-07 16:33 ` Shriram Rajagopalan
2011-03-07 17:53 ` Konrad Rzeszutek Wilk
2011-03-07 18:17 ` Shriram Rajagopalan
2011-03-08 15:53 ` Konrad Rzeszutek Wilk
2011-03-07 17:39 ` Konrad Rzeszutek Wilk
2011-03-04 20:05 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikcbVEXdRsS1WYCNTinuYLcmiJ1dz2ReS18_A+3@mail.gmail.com \
--to=frankpzh@gmail.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Jeremy.Fitzhardinge@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).