Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Fix wrong output in mpacpi_pci_foundbus() w...



details:   https://anonhg.NetBSD.org/src/rev/e56973b9d6ed
branches:  trunk
changeset: 339015:e56973b9d6ed
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Jun 22 07:26:52 2015 +0000

description:
Fix wrong output in mpacpi_pci_foundbus() with MPVERBOSE. Assign
vaues before printing them.

diffstat:

 sys/arch/x86/x86/mpacpi.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (44 lines):

diff -r 0df0e3604210 -r e56973b9d6ed sys/arch/x86/x86/mpacpi.c
--- a/sys/arch/x86/x86/mpacpi.c Mon Jun 22 07:07:10 2015 +0000
+++ b/sys/arch/x86/x86/mpacpi.c Mon Jun 22 07:26:52 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpacpi.c,v 1.97 2013/03/25 01:30:37 chs Exp $  */
+/*     $NetBSD: mpacpi.c,v 1.98 2015/06/22 07:26:52 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.97 2013/03/25 01:30:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.98 2015/06/22 07:26:52 msaitoh Exp $");
 
 #include "acpica.h"
 #include "opt_acpi.h"
@@ -495,6 +495,12 @@
        }
 
        mpr = kmem_zalloc(sizeof(struct mpacpi_pcibus), KM_SLEEP);
+       mpr->mpr_handle = ad->ad_handle;
+       mpr->mpr_buf = buf;
+       mpr->mpr_seg = ad->ad_pciinfo->ap_segment;
+       mpr->mpr_bus = ad->ad_pciinfo->ap_downbus;
+       TAILQ_INSERT_TAIL(&mpacpi_pcibusses, mpr, mpr_list);
+
        if ((ad->ad_devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) {
                if (mp_verbose)
                        printf("mpacpi: found root PCI bus %d\n",
@@ -506,12 +512,6 @@
                            mpr->mpr_bus);
        }
 
-       mpr->mpr_handle = ad->ad_handle;
-       mpr->mpr_buf = buf;
-       mpr->mpr_seg = ad->ad_pciinfo->ap_segment;
-       mpr->mpr_bus = ad->ad_pciinfo->ap_downbus;
-       TAILQ_INSERT_TAIL(&mpacpi_pcibusses, mpr, mpr_list);
-
        /*
         * XXX this wrongly assumes that bus numbers are unique
         * even between segments.



Home | Main Index | Thread Index | Old Index