summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2015-05-25 09:47:16 +0000
committerroyger <royger@FreeBSD.org>2015-05-25 09:47:16 +0000
commit8d3ecc0ad786e5f3bd56dbb341f96bf9cd825f60 (patch)
tree76fa78dd4d38b47340bf012de0eb5055de2cbf67 /sys/x86
parente1f68e3cfb486ab5b85834b353842edfcbd2418e (diff)
downloadFreeBSD-src-8d3ecc0ad786e5f3bd56dbb341f96bf9cd825f60.zip
FreeBSD-src-8d3ecc0ad786e5f3bd56dbb341f96bf9cd825f60.tar.gz
xen: make sure xenpv bus is the last to attach
This is needed so other buses have a chance of attaching a real ISA bus, if none is found xenpv will attach it. Sponsored by: Citrix Systems R&D
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/xen/xenpv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/x86/xen/xenpv.c b/sys/x86/xen/xenpv.c
index 2e4a9fe..50fd9df 100644
--- a/sys/x86/xen/xenpv.c
+++ b/sys/x86/xen/xenpv.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <sys/pcpu.h>
#include <sys/rman.h>
#include <sys/smp.h>
+#include <sys/limits.h>
#include <vm/vm.h>
#include <vm/vm_page.h>
@@ -72,7 +73,11 @@ xenpv_identify(driver_t *driver, device_t parent)
if (devclass_get_device(xenpv_devclass, 0))
return;
- if (BUS_ADD_CHILD(parent, 0, "xenpv", 0) == NULL)
+ /*
+ * The xenpv bus should be the last to attach in order
+ * to properly detect if an ISA bus has already been added.
+ */
+ if (BUS_ADD_CHILD(parent, UINT_MAX, "xenpv", 0) == NULL)
panic("Unable to attach xenpv bus.");
}
OpenPOWER on IntegriCloud