]> xenbits.xensource.com Git - people/sstabellini/linux-pvhvm-deprecated.git/commitdiff
xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 2 Dec 2010 17:54:50 +0000 (17:54 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 16 Feb 2011 13:35:59 +0000 (13:35 +0000)
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
drivers/xen/platform-pci.c

index db8c4c4ac88086bf7c2e9d1dfa946da399e91b27..459cf8e14f76fb2da5a84f673d036bd20e7d3ecb 100644 (file)
@@ -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);
index afbe041f42c5afed624c021898028cfa482dbd1a..319dd0a94d5135389ff7f932ef68872f0936f5e0 100644 (file)
@@ -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: