diff options
author | jhb <jhb@FreeBSD.org> | 2001-06-18 19:19:38 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-06-18 19:19:38 +0000 |
commit | 106b33e493cecca93d20edb82d49fb3250fa4290 (patch) | |
tree | fd1a4024bf45d24ef07051e52f18c116d59f4fa2 /sys/i386 | |
parent | 541ec06b6c87d8bb642ea1396033a316a04e513f (diff) | |
download | FreeBSD-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/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 196b3cc..a1181f7 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/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(); |