summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-04-02 22:19:16 +0000
committerjhb <jhb@FreeBSD.org>2002-04-02 22:19:16 +0000
commit9d3d63fcbcfccaf091b15608a262de78b5912c8a (patch)
treea511bf3088c2455af875faa67fac4fc49ade8493 /sys/sparc64
parent26f5df0f6761c5fad4b517e8c0c4b46da408361b (diff)
downloadFreeBSD-src-9d3d63fcbcfccaf091b15608a262de78b5912c8a.zip
FreeBSD-src-9d3d63fcbcfccaf091b15608a262de78b5912c8a.tar.gz
- Move the MI mutexes sched_lock and Giant from being declared in the
various machdep.c's to being declared in kern_mutex.c. - Add a new function mutex_init() used to perform early initialization needed for mutexes such as setting up thread0's contested lock list and initializing MI mutexes. Change the various MD startup routines to call this function instead of duplicating all the code themselves. Tested on: alpha, i386
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/machdep.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 9f1615f..2042a8d 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -115,9 +115,6 @@ int cold = 1;
long dumplo;
int Maxmem;
-struct mtx Giant;
-struct mtx sched_lock;
-
char pcpu0[PCPU_PAGES * PAGE_SIZE];
char uarea0[UAREA_PAGES * PAGE_SIZE];
struct trapframe frame0;
@@ -294,7 +291,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
frame0.tf_tstate = TSTATE_IE | TSTATE_PEF;
thread0.td_frame = &frame0;
- LIST_INIT(&thread0.td_contested);
/*
* Prime our per-cpu data page for use. Note, we are using it for our
@@ -323,15 +319,8 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
pmap_kenter((vm_offset_t)msgbufp + off, msgbuf_phys + off);
msgbufinit(msgbufp, MSGBUF_SIZE);
- /*
- * Initialize mutexes.
- */
- mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE);
- mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE);
- mtx_init(&proc0.p_mtx, "process lock", MTX_DEF|MTX_DUPOK);
+ mutex_init();
intr_init2();
-
- mtx_lock(&Giant);
}
void
OpenPOWER on IntegriCloud