summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2009-11-09 22:01:58 +0000
committergonzo <gonzo@FreeBSD.org>2009-11-09 22:01:58 +0000
commit9517a1460fe8bf9b2ab0c1e61318ca989a7ea84f (patch)
tree3f9bfa042f118584f0e0bb9cc14ebe04a81d7682
parentf44a14ea63a73b4cf28c53806a98401704b114c2 (diff)
downloadFreeBSD-src-9517a1460fe8bf9b2ab0c1e61318ca989a7ea84f.zip
FreeBSD-src-9517a1460fe8bf9b2ab0c1e61318ca989a7ea84f.tar.gz
Unbreak booting of FreeBSD/mips by merging r195429 from projects/mips:
- 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
-rw-r--r--sys/mips/mips/machdep.c3
-rw-r--r--sys/mips/mips/pmap.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c
index 6bd5180..9898ab7 100644
--- a/sys/mips/mips/machdep.c
+++ b/sys/mips/mips/machdep.c
@@ -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
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c
index 25b0b3a..de14439 100644
--- a/sys/mips/mips/pmap.c
+++ b/sys/mips/mips/pmap.c
@@ -331,9 +331,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.
*/
OpenPOWER on IntegriCloud