1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

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.
This commit is contained in:
John Baldwin 2001-06-18 19:19:38 +00:00
parent 0865563a93
commit ce1a1f42fb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78427
2 changed files with 12 additions and 30 deletions

View File

@ -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 */
@ -1958,11 +1954,6 @@ init386(first)
r_idt.rd_base = (int) idt;
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.
*/

View File

@ -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 */
@ -1958,11 +1954,6 @@ init386(first)
r_idt.rd_base = (int) idt;
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.
*/