summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-09-19 18:29:15 +0000
committerattilio <attilio@FreeBSD.org>2011-09-19 18:29:15 +0000
commit420a3a3f8b180b80050cf413be2371b720f6948a (patch)
treeed5187a176a00dc21428aa889ad69cd4b88c4a62
parentb20c15d80bd46b4ea80d385c984e6e79371a3d1a (diff)
downloadFreeBSD-src-420a3a3f8b180b80050cf413be2371b720f6948a.zip
FreeBSD-src-420a3a3f8b180b80050cf413be2371b720f6948a.tar.gz
It is safe to initialize locks even on early boot (and it is the same
thing all the other architectures already do) thus just initialize kernel_pmap in pmap_bootstrap(). Reported by: alc Reviewed by: alc, marius Tested by: flo, marius Approved by: re (kib) MFC after: 1 week
-rw-r--r--sys/sparc64/sparc64/machdep.c5
-rw-r--r--sys/sparc64/sparc64/pmap.c4
2 files changed, 1 insertions, 8 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 91d7416..c6252cd 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -597,11 +597,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
wrpr(pil, 0, 0);
wrpr(pstate, 0, PSTATE_KERNEL);
- /*
- * Finish pmap initialization now that we're ready for mutexes.
- */
- PMAP_LOCK_INIT(kernel_pmap);
-
OF_getprop(root, "name", sparc64_model, sizeof(sparc64_model) - 1);
kdb_init();
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c
index 209be10..e34bd20 100644
--- a/sys/sparc64/sparc64/pmap.c
+++ b/sys/sparc64/sparc64/pmap.c
@@ -671,11 +671,9 @@ pmap_bootstrap(u_int cpu_impl)
/*
* Initialize the kernel pmap (which is statically allocated).
- * NOTE: PMAP_LOCK_INIT() is needed as part of the initialization
- * but sparc64 start up is not ready to initialize mutexes yet.
- * It is called in machdep.c.
*/
pm = kernel_pmap;
+ PMAP_LOCK_INIT(pm);
for (i = 0; i < MAXCPU; i++)
pm->pm_context[i] = TLB_CTX_KERNEL;
CPU_FILL(&pm->pm_active);
OpenPOWER on IntegriCloud