From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: xen: only set pm function ptrs for Xen guests
Date: Wed, 28 Aug 2013 11:19:54 -0500 [thread overview]
Message-ID: <1377706794-8481-1-git-send-email-robherring2@gmail.com> (raw)
From: Rob Herring <rob.herring@calxeda.com>
xen_pm_init was unconditionally setting pm_power_off and arm_pm_restart
function pointers. This breaks multi-platform kernels. Move this
initialization into xen_guest_init, so it is conditional on running as a
Xen guest.
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
This breaks reset and poweroff for Midway when Xen is enabled. This
should go into 3.11 or stable.
Rob
arch/arm/xen/enlighten.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 8a6295c..fa86452 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -263,6 +263,9 @@ static int __init xen_guest_init(void)
if (xen_vcpu_info == NULL)
return -ENOMEM;
+ pm_power_off = xen_power_off;
+ arm_pm_restart = xen_restart;
+
gnttab_init();
if (!xen_initial_domain())
xenbus_probe(NULL);
@@ -271,15 +274,6 @@ static int __init xen_guest_init(void)
}
core_initcall(xen_guest_init);
-static int __init xen_pm_init(void)
-{
- pm_power_off = xen_power_off;
- arm_pm_restart = xen_restart;
-
- return 0;
-}
-subsys_initcall(xen_pm_init);
-
static irqreturn_t xen_arm_callback(int irq, void *arg)
{
xen_hvm_evtchn_do_upcall();
--
1.8.1.2
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robherring2@gmail.com>
To: xen-devel@lists.xensource.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Rob Herring <rob.herring@calxeda.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH] ARM: xen: only set pm function ptrs for Xen guests
Date: Wed, 28 Aug 2013 11:19:54 -0500 [thread overview]
Message-ID: <1377706794-8481-1-git-send-email-robherring2@gmail.com> (raw)
From: Rob Herring <rob.herring@calxeda.com>
xen_pm_init was unconditionally setting pm_power_off and arm_pm_restart
function pointers. This breaks multi-platform kernels. Move this
initialization into xen_guest_init, so it is conditional on running as a
Xen guest.
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
This breaks reset and poweroff for Midway when Xen is enabled. This
should go into 3.11 or stable.
Rob
arch/arm/xen/enlighten.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 8a6295c..fa86452 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -263,6 +263,9 @@ static int __init xen_guest_init(void)
if (xen_vcpu_info == NULL)
return -ENOMEM;
+ pm_power_off = xen_power_off;
+ arm_pm_restart = xen_restart;
+
gnttab_init();
if (!xen_initial_domain())
xenbus_probe(NULL);
@@ -271,15 +274,6 @@ static int __init xen_guest_init(void)
}
core_initcall(xen_guest_init);
-static int __init xen_pm_init(void)
-{
- pm_power_off = xen_power_off;
- arm_pm_restart = xen_restart;
-
- return 0;
-}
-subsys_initcall(xen_pm_init);
-
static irqreturn_t xen_arm_callback(int irq, void *arg)
{
xen_hvm_evtchn_do_upcall();
--
1.8.1.2
next reply other threads:[~2013-08-28 16:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 16:19 Rob Herring [this message]
2013-08-28 16:19 ` [PATCH] ARM: xen: only set pm function ptrs for Xen guests Rob Herring
2013-08-28 16:32 ` [Xen-devel] " Julien Grall
2013-08-28 16:32 ` Julien Grall
2013-08-28 18:03 ` Rob Herring
2013-08-28 18:03 ` Rob Herring
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=1377706794-8481-1-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.