Module Name: src
Committed By: cherry
Date: Thu Jan 12 19:37:46 UTC 2012
Modified Files:
src/sys/arch/i386/i386: machdep.c
Log Message:
re-order call to x86_bus_space_init() until after %fs is initialised via
initgdt().
x86_bus_space_init() uses mutex(9) since it uses extent(9), which requires %fs
to be setup before use.
To generate a diff of this commit:
cvs rdiff -u -r1.715 -r1.716 src/sys/arch/i386/i386/machdep.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/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.715 src/sys/arch/i386/i386/machdep.c:1.716
--- src/sys/arch/i386/i386/machdep.c:1.715 Fri Dec 30 17:57:49 2011
+++ src/sys/arch/i386/i386/machdep.c Thu Jan 12 19:37:45 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.715 2011/12/30 17:57:49 cherry Exp $ */
+/* $NetBSD: machdep.c,v 1.716 2012/01/12 19:37:45 cherry Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.715 2011/12/30 17:57:49 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.716 2012/01/12 19:37:45 cherry Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1354,9 +1354,6 @@ init386(paddr_t first_avail)
cpu_info_primary.ci_pae_l3_pdir = (pd_entry_t *)(rcr3() + KERNBASE);
#endif /* PAE && !XEN */
-#if NISA > 0 || NPCI > 0
- x86_bus_space_init();
-#endif
#ifdef XEN
xen_parse_cmdline(XEN_PARSE_BOOTFLAGS, NULL);
#endif
@@ -1412,6 +1409,11 @@ init386(paddr_t first_avail)
*/
initgdt(NULL);
#endif /* XEN */
+
+#if NISA > 0 || NPCI > 0
+ x86_bus_space_init();
+#endif /* NISA > 0 || NPCI > 0 */
+
consinit(); /* XXX SHOULD NOT BE DONE HERE */
#ifdef DEBUG_MEMLOAD