diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2010-12-02 17:54:50 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-02-25 16:43:03 +0000 |
commit | 702d4eb9b3de4398ab99cf0a4e799e552c7ab756 (patch) | |
tree | 8145ce0d54f4f3c3148e188d640f99fc305e8b2a /drivers | |
parent | f5412be599602124d2bdd49947b231dd77c0bf99 (diff) | |
download | linux-702d4eb9b3de4398ab99cf0a4e799e552c7ab756.tar.gz linux-702d4eb9b3de4398ab99cf0a4e799e552c7ab756.tar.bz2 linux-702d4eb9b3de4398ab99cf0a4e799e552c7ab756.zip |
xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/xen/manage.c | 17 | ||||
-rw-r--r-- | 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 24177272bcb8..b2a8d7856ce3 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 afbe041f42c5..319dd0a94d51 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: |