Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 702d4eb9 authored by Stefano Stabellini's avatar Stefano Stabellini
Browse files

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: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: default avatarJeremy Fitzhardinge <jeremy@goop.org>
parent f5412be5
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -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);
+0 −3
Original line number Diff line number Diff line
@@ -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: