Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jul 2009 19:55:09 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r195429 - projects/mips/sys/mips/mips
Message-ID:  <200907071955.n67Jt9Da027678@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Tue Jul  7 19:55:09 2009
New Revision: 195429
URL: http://svn.freebsd.org/changeset/base/195429

Log:
  - Move dpcpu initialization to mips_proc0_init. It's
      more appropriate place for it. Besides dpcpu_init
      requires pmap module to be initialized and calling it
      int pmap.c hangs the system

Modified:
  projects/mips/sys/mips/mips/machdep.c
  projects/mips/sys/mips/mips/pmap.c

Modified: projects/mips/sys/mips/mips/machdep.c
==============================================================================
--- projects/mips/sys/mips/mips/machdep.c	Tue Jul  7 19:48:30 2009	(r195428)
+++ projects/mips/sys/mips/mips/machdep.c	Tue Jul  7 19:55:09 2009	(r195429)
@@ -274,6 +274,9 @@ mips_proc0_init(void)
 	    (thread0.td_kstack_pages - 1) * PAGE_SIZE) - 1;
 	thread0.td_frame = &thread0.td_pcb->pcb_regs;
 
+	/* Steal memory for the dynamic per-cpu area. */
+	dpcpu_init((void *)pmap_steal_memory(DPCPU_SIZE), 0);
+
 	/*
 	 * There is no need to initialize md_upte array for thread0 as it's
 	 * located in .bss section and should be explicitly zeroed during 

Modified: projects/mips/sys/mips/mips/pmap.c
==============================================================================
--- projects/mips/sys/mips/mips/pmap.c	Tue Jul  7 19:48:30 2009	(r195428)
+++ projects/mips/sys/mips/mips/pmap.c	Tue Jul  7 19:55:09 2009	(r195429)
@@ -332,9 +332,6 @@ again:
 	msgbufp = (struct msgbuf *)pmap_steal_memory(MSGBUF_SIZE);
 	msgbufinit(msgbufp, MSGBUF_SIZE);
 
-	/* Steal memory for the dynamic per-cpu area. */
-	dpcpu_init((void *)pmap_steal_memory(DPCPU_SIZE), 0);
-
 	/*
 	 * Steal thread0 kstack.
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907071955.n67Jt9Da027678>