aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Pau Monné <royger@FreeBSD.org>2015-05-25 09:47:16 +0000
committerRoger Pau Monné <royger@FreeBSD.org>2015-05-25 09:47:16 +0000
commit02761cf314ec8e97b649f411b10b4fdb6ce3e7a4 (patch)
tree76fa78dd4d38b47340bf012de0eb5055de2cbf67
parente61d4e626e1426e61d4ccbbddcacd9e1f1dd96df (diff)
downloadsrc-02761cf314ec8e97b649f411b10b4fdb6ce3e7a4.tar.gz
src-02761cf314ec8e97b649f411b10b4fdb6ce3e7a4.zip
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
Notes
Notes: svn path=/head/; revision=283516
-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 2e4a9fea8f9a..50fd9df14912 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.");
}