summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-06-18 19:19:38 +0000
committerjhb <jhb@FreeBSD.org>2001-06-18 19:19:38 +0000
commit106b33e493cecca93d20edb82d49fb3250fa4290 (patch)
treefd1a4024bf45d24ef07051e52f18c116d59f4fa2 /sys/amd64
parent541ec06b6c87d8bb642ea1396033a316a04e513f (diff)
downloadFreeBSD-src-106b33e493cecca93d20edb82d49fb3250fa4290.zip
FreeBSD-src-106b33e493cecca93d20edb82d49fb3250fa4290.tar.gz
Initialize mutexes needed early on all in the same place so that the
startup routine more closely matches that of alpha and ia64. At some point the common mutexes shared across all platforms probably should move into sys/kern_mutex.c.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/machdep.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 196b3cc..a1181f7 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1885,20 +1885,16 @@ init386(first)
LIST_INIT(&proc0.p_contested);
- mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE);
-#ifdef SMP
- /*
- * Interrupts can happen very early, so initialize imen_mtx here, rather
- * than in init_locks().
- */
- mtx_init(&imen_mtx, "imen", MTX_SPIN);
-#endif
-
/*
- * Giant is used early for at least debugger traps and unexpected traps.
+ * Initialize mutexes.
*/
mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE);
+ mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE);
mtx_init(&proc0.p_mtx, "process lock", MTX_DEF);
+ mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_RECURSE);
+#ifdef SMP
+ mtx_init(&imen_mtx, "imen", MTX_SPIN);
+#endif
mtx_lock(&Giant);
/* make ldt memory segments */
@@ -1959,11 +1955,6 @@ init386(first)
lidt(&r_idt);
/*
- * We need this mutex before the console probe.
- */
- mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_RECURSE);
-
- /*
* Initialize the console before we print anything out.
*/
cninit();
OpenPOWER on IntegriCloud