Module Name:    src
Committed By:   bouyer
Date:           Fri Jan 31 10:37:01 UTC 2014

Modified Files:
        src/sys/arch/xen/x86: mainbus.c

Log Message:
Move back call to pci_mode_detect() outside of #ifdef PCI_BUS_FIXUP.
Even if mode is not used, the call to pci_mode_detect() is mandatory to
initialize the PCI subsystem.
Fix "panic booting -current DOM0" reported by Patrick Welche on port-xen.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/x86/mainbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/x86/mainbus.c
diff -u src/sys/arch/xen/x86/mainbus.c:1.16 src/sys/arch/xen/x86/mainbus.c:1.17
--- src/sys/arch/xen/x86/mainbus.c:1.16	Wed Nov  6 06:23:15 2013
+++ src/sys/arch/xen/x86/mainbus.c	Fri Jan 31 10:37:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.16 2013/11/06 06:23:15 mrg Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.17 2014/01/31 10:37:01 bouyer Exp $	*/
 /*	NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp 	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.16 2013/11/06 06:23:15 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.17 2014/01/31 10:37:01 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -133,7 +133,7 @@ mainbus_match(device_t parent, cfdata_t 
 void
 mainbus_attach(device_t parent, device_t self, void *aux)
 {
-#if defined(DOM0OPS) && NPCI > 0 && defined(PCI_BUS_FIXUP)
+#if defined(DOM0OPS) && NPCI > 0
 	int mode;
 #endif
 	union mainbus_attach_args mba;
@@ -157,8 +157,8 @@ mainbus_attach(device_t parent, device_t
 #endif
 #if NPCI > 0
 		/* ACPI needs to be able to access PCI configuration space. */
-#ifdef PCI_BUS_FIXUP
 		mode = pci_mode_detect();
+#ifdef PCI_BUS_FIXUP
 		if (mode != 0) {
 			pci_maxbus = pci_bus_fixup(NULL, 0);
 			aprint_debug_dev(self, "PCI bus max, after "

Reply via email to