mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: stefano.stabellini@eu.citrix.com
To: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xensource.com, Jeremy.Fitzhardinge@citrix.com,
	konrad.wilk@oracle.com, Stefano.Stabellini@eu.citrix.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH 1/7] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
Date: Wed, 16 Feb 2011 17:53:01 +0000	[thread overview]
Message-ID: <1297878787-378-1-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1102161739370.2826@kaball-desktop>

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Now that xenstore_ready is used correctly for PV on HVM guests too, we
don't need to delay the initialization of xen_setup_shutdown_event
anymore.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
---
 drivers/xen/manage.c       |   17 ++++-------------
 drivers/xen/platform-pci.c |    3 ---
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index db8c4c4..459cf8e 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -281,27 +281,18 @@ static int shutdown_event(struct notifier_block *notifier,
 	return NOTIFY_DONE;
 }
 
-static int __init __setup_shutdown_event(void)
-{
-	/* Delay initialization in the PV on HVM case */
-	if (xen_hvm_domain())
-		return 0;
-
-	if (!xen_pv_domain())
-		return -ENODEV;
-
-	return xen_setup_shutdown_event();
-}
-
 int xen_setup_shutdown_event(void)
 {
 	static struct notifier_block xenstore_notifier = {
 		.notifier_call = shutdown_event
 	};
+
+	if (!xen_domain())
+		return -ENODEV;
 	register_xenstore_notifier(&xenstore_notifier);
 
 	return 0;
 }
 EXPORT_SYMBOL_GPL(xen_setup_shutdown_event);
 
-subsys_initcall(__setup_shutdown_event);
+subsys_initcall(xen_setup_shutdown_event);
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index afbe041..319dd0a 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -156,9 +156,6 @@ static int __devinit platform_pci_init(struct pci_dev *pdev,
 	if (ret)
 		goto out;
 	xenbus_probe(NULL);
-	ret = xen_setup_shutdown_event();
-	if (ret)
-		goto out;
 	return 0;
 
 out:
-- 
1.5.6.5


  reply	other threads:[~2011-02-16 17:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16 17:51 [PATCH 0/7] Xen PV on HVM fixes and improvements Stefano Stabellini
2011-02-16 17:53 ` stefano.stabellini [this message]
2011-02-16 17:53 ` [PATCH 2/7] xen: do not use xen_info on HVM, set pv_info name to "Xen HVM" stefano.stabellini
2011-02-16 17:53 ` [PATCH 3/7] xen-blkfront: handle Xen major numbers other than XENVBD stefano.stabellini
2011-02-22 19:19   ` Konrad Rzeszutek Wilk
2011-02-25 15:38     ` Stefano Stabellini
2011-02-16 17:53 ` [PATCH 4/7] xen: make the ballon driver work for hvm domains stefano.stabellini
2011-02-16 17:53 ` [PATCH 5/7] xen: PV on HVM: support PV spinlocks stefano.stabellini
2011-02-22 19:31   ` Konrad Rzeszutek Wilk
2011-02-16 17:53 ` [PATCH 6/7] xen: enable event channels to send and receive IPIs for PV on HVM guests stefano.stabellini
2011-02-22 19:30   ` Konrad Rzeszutek Wilk
2011-02-25 15:40     ` Stefano Stabellini
2011-02-16 17:53 ` [PATCH 7/7] xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled stefano.stabellini

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=1297878787-378-1-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®