]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen/control: register pv shutdown handler for ARM
authorJulien Grall <julien.grall@linaro.org>
Fri, 4 Apr 2014 23:52:05 +0000 (00:52 +0100)
committerJulien Grall <julien.grall@citrix.com>
Mon, 5 Oct 2015 17:55:19 +0000 (18:55 +0100)
sys/dev/xen/control/control.c

index 472cf11c81b527b2afc253d3a27e1d491fad1307..40a42d7c20b0e1925200ca3eeedda6c62d448f64 100644 (file)
@@ -379,6 +379,12 @@ xctrl_probe(device_t dev)
        return (BUS_PROBE_NOWILDCARD);
 }
 
+#if defined (__arm__)
+#define has_pv_shutdown_handler() xen_hvm_domain()
+#else
+#define has_pv_shutdown_handler() xen_pv_domain()
+#endif
+
 /**
  * \brief Attach the Xen control device.
  *
@@ -400,7 +406,7 @@ xctrl_attach(device_t dev)
        xctrl->xctrl_watch.callback_data = (uintptr_t)xctrl;
        xs_register_watch(&xctrl->xctrl_watch);
 
-       if (xen_pv_domain())
+       if (has_pv_shutdown_handler())
                EVENTHANDLER_REGISTER(shutdown_final, xen_pv_shutdown_final, NULL,
                                      SHUTDOWN_PRI_LAST);