Module Name: src Committed By: msaitoh Date: Mon Jun 22 07:26:52 UTC 2015
Modified Files: src/sys/arch/x86/x86: mpacpi.c Log Message: Fix wrong output in mpacpi_pci_foundbus() with MPVERBOSE. Assign vaues before printing them. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/x86/x86/mpacpi.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/x86/x86/mpacpi.c diff -u src/sys/arch/x86/x86/mpacpi.c:1.97 src/sys/arch/x86/x86/mpacpi.c:1.98 --- src/sys/arch/x86/x86/mpacpi.c:1.97 Mon Mar 25 01:30:37 2013 +++ src/sys/arch/x86/x86/mpacpi.c Mon Jun 22 07:26:52 2015 @@ -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 @@ mpacpi_pci_foundbus(struct acpi_devnode } 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 @@ mpacpi_pci_foundbus(struct acpi_devnode 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.