Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/xen/x86 Move back call to pci_mode_detect() outside...



details:   https://anonhg.NetBSD.org/src/rev/e2f04b5e66c8
branches:  trunk
changeset: 326486:e2f04b5e66c8
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Jan 31 10:37:01 2014 +0000

description:
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.

diffstat:

 sys/arch/xen/x86/mainbus.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 2c263638fc98 -r e2f04b5e66c8 sys/arch/xen/x86/mainbus.c
--- a/sys/arch/xen/x86/mainbus.c        Fri Jan 31 10:35:14 2014 +0000
+++ b/sys/arch/xen/x86/mainbus.c        Fri Jan 31 10:37:01 2014 +0000
@@ -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 @@
 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 @@
 #endif
 #if NPCI > 0
                /* ACPI needs to be able to access PCI configuration space. */
+               mode = pci_mode_detect();
 #ifdef PCI_BUS_FIXUP
-               mode = pci_mode_detect();
                if (mode != 0) {
                        pci_maxbus = pci_bus_fixup(NULL, 0);
                        aprint_debug_dev(self, "PCI bus max, after "



Home | Main Index | Thread Index | Old Index