]> 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@linaro.org>
Sun, 12 Apr 2015 11:08:10 +0000 (12:08 +0100)
sys/dev/xen/control/control.c

index 8504dacc482d0512c6838a0ab23974954be5ee8f..7139790c7e849d88815af0c7c2169b9ded3ba21d 100644 (file)
@@ -511,6 +511,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.
  *
@@ -532,7 +538,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);