[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1298653920-20299-1-git-send-email-stefano.stabellini@eu.citrix.com>
Date: Fri, 25 Feb 2011 17:11:55 +0000
From: stefano.stabellini@...citrix.com
To: linux-kernel@...r.kernel.org
Cc: xen-devel@...ts.xensource.com, Jeremy.Fitzhardinge@...rix.com,
konrad.wilk@...cle.com, Stefano.Stabellini@...citrix.com,
Stefano Stabellini <stefano.stabellini@...citrix.com>
Subject: [PATCH v2 1/6] xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
From: Stefano Stabellini <stefano.stabellini@...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@...citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@...p.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 2417727..b2a8d78 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -291,27 +291,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists