Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 re-order call to x86_bus_space_init() unt...



details:   https://anonhg.NetBSD.org/src/rev/d9d8c13325c8
branches:  trunk
changeset: 772695:d9d8c13325c8
user:      cherry <cherry%NetBSD.org@localhost>
date:      Thu Jan 12 19:37:45 2012 +0000

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

diffstat:

 sys/arch/i386/i386/machdep.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 2c76ec2190f6 -r d9d8c13325c8 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Thu Jan 12 14:10:56 2012 +0000
+++ b/sys/arch/i386/i386/machdep.c      Thu Jan 12 19:37:45 2012 +0000
@@ -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 @@
        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 @@
         */
        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



Home | Main Index | Thread Index | Old Index