diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-24 17:56:07 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-24 17:56:07 +0000 |
commit | 7aec5b0f6ddc48947940a5488c79b478d0550c24 (patch) | |
tree | 845f5bca1c1dde697ed4510eb4f771b4d5f9689b | |
parent | 55d3b92d02b8725ed2ea2e23c377f473962f52e1 (diff) |
There is no reason to protect the pmap_vp_pool with splvm(). The only pmap
that gets manipulated in interrupt context is the kernel pmap, and we fully
populate its VP mappings during pmap_bootstrap(). Gets rid of the excessive
spl's at pmap_destroy() time noticed by deraadt@
ok deraadt@, drahn@
-rw-r--r-- | sys/arch/powerpc/powerpc/pmap.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index b935a497686..5fc73e31ddf 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.113 2010/04/15 21:30:29 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.114 2010/04/24 17:56:06 kettenis Exp $ */ /* * Copyright (c) 2001, 2002, 2007 Dale Rahn. @@ -358,15 +358,12 @@ pmap_vp_enter(pmap_t pm, vaddr_t va, struct pte_desc *pted, int flags) { struct pmapvp *vp1; struct pmapvp *vp2; - int s; pmap_simplelock_pm(pm); vp1 = pm->pm_vp[VP_SR(va)]; if (vp1 == NULL) { - s = splvm(); vp1 = pool_get(&pmap_vp_pool, PR_NOWAIT | PR_ZERO); - splx(s); if (vp1 == NULL) { if ((flags & PMAP_CANFAIL) == 0) panic("pmap_vp_enter: failed to allocate vp1"); @@ -377,9 +374,7 @@ pmap_vp_enter(pmap_t pm, vaddr_t va, struct pte_desc *pted, int flags) vp2 = vp1->vp[VP_IDX1(va)]; if (vp2 == NULL) { - s = splvm(); vp2 = pool_get(&pmap_vp_pool, PR_NOWAIT | PR_ZERO); - splx(s); if (vp2 == NULL) { if ((flags & PMAP_CANFAIL) == 0) panic("pmap_vp_enter: failed to allocate vp2"); @@ -1377,7 +1372,6 @@ void pmap_vp_destroy(pmap_t pm) { int i, j; - int s; struct pmapvp *vp1; struct pmapvp *vp2; @@ -1391,14 +1385,10 @@ pmap_vp_destroy(pmap_t pm) if (vp2 == NULL) continue; - s = splvm(); pool_put(&pmap_vp_pool, vp2); - splx(s); } pm->pm_vp[i] = NULL; - s = splvm(); pool_put(&pmap_vp_pool, vp1); - splx(s); } } |