Module Name: src
Committed By: dyoung
Date: Mon Feb 15 23:53:56 UTC 2010
Modified Files:
src/sys/arch/xen/x86: mainbus.c
Log Message:
Don't use the global variable pci_mode, but use a local copy of
the return value of pci_mode_detect(), instead.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 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.9 src/sys/arch/xen/x86/mainbus.c:1.10
--- src/sys/arch/xen/x86/mainbus.c:1.9 Tue Aug 18 16:41:03 2009
+++ src/sys/arch/xen/x86/mainbus.c Mon Feb 15 23:53:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.9 2009/08/18 16:41:03 jmcneill Exp $ */
+/* $NetBSD: mainbus.c,v 1.10 2010/02/15 23:53:56 dyoung 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.9 2009/08/18 16:41:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.10 2010/02/15 23:53:56 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -134,6 +134,9 @@
void
mainbus_attach(device_t parent, device_t self, void *aux)
{
+#if NPCI > 0
+ int mode;
+#endif
union mainbus_attach_args mba;
#if defined(DOM0OPS)
int numcpus = 0;
@@ -155,9 +158,9 @@
#endif
#if NPCI > 0
/* ACPI needs to be able to access PCI configuration space. */
- pci_mode = pci_mode_detect();
+ mode = pci_mode_detect();
#ifdef PCI_BUS_FIXUP
- if (pci_mode != 0) {
+ if (mode != 0) {
pci_maxbus = pci_bus_fixup(NULL, 0);
aprint_debug_dev(self, "PCI bus max, after "
"pci_bus_fixup: %i\n", pci_maxbus);