summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-08-22 18:12:24 +0000
committerkib <kib@FreeBSD.org>2013-08-22 18:12:24 +0000
commit05a9dff802e2ec3a2f8ab5836657ced5977fca68 (patch)
treeee8d62f2966140cf842124e46724b5ecf3d56ac8 /sys/powerpc/aim
parent076969f54a69e4b15a5489465a537f9eb246b869 (diff)
downloadFreeBSD-src-05a9dff802e2ec3a2f8ab5836657ced5977fca68.zip
FreeBSD-src-05a9dff802e2ec3a2f8ab5836657ced5977fca68.tar.gz
Revert r254501. Instead, reuse the type stability of the struct pmap
which is the part of struct vmspace, allocated from UMA_ZONE_NOFREE zone. Initialize the pmap lock in the vmspace zone init function, and remove pmap lock initialization and destruction from pmap_pinit() and pmap_release(). Suggested and reviewed by: alc (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r--sys/powerpc/aim/mmu_oea.c3
-rw-r--r--sys/powerpc/aim/mmu_oea64.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index 38b25d0..f4e9d9b 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -1655,7 +1655,6 @@ moea_pinit(mmu_t mmu, pmap_t pmap)
u_int entropy;
KASSERT((int)pmap < VM_MIN_KERNEL_ADDRESS, ("moea_pinit: virt pmap"));
- PMAP_LOCK_INIT(pmap);
RB_INIT(&pmap->pmap_pvo);
entropy = 0;
@@ -1719,6 +1718,7 @@ void
moea_pinit0(mmu_t mmu, pmap_t pm)
{
+ PMAP_LOCK_INIT(pm);
moea_pinit(mmu, pm);
bzero(&pm->pm_stats, sizeof(pm->pm_stats));
}
@@ -1824,7 +1824,6 @@ moea_release(mmu_t mmu, pmap_t pmap)
idx /= VSID_NBPW;
moea_vsid_bitmap[idx] &= ~mask;
mtx_unlock(&moea_vsid_mutex);
- PMAP_LOCK_DESTROY(pmap);
}
/*
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 2e3b98e..ba1da12 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -1879,7 +1879,7 @@ moea64_get_unique_vsid(void) {
void
moea64_pinit(mmu_t mmu, pmap_t pmap)
{
- PMAP_LOCK_INIT(pmap);
+
RB_INIT(&pmap->pmap_pvo);
pmap->pm_slb_tree_root = slb_alloc_tree();
@@ -1893,7 +1893,6 @@ moea64_pinit(mmu_t mmu, pmap_t pmap)
int i;
uint32_t hash;
- PMAP_LOCK_INIT(pmap);
RB_INIT(&pmap->pmap_pvo);
if (pmap_bootstrapped)
@@ -1920,6 +1919,8 @@ moea64_pinit(mmu_t mmu, pmap_t pmap)
void
moea64_pinit0(mmu_t mmu, pmap_t pm)
{
+
+ PMAP_LOCK_INIT(pm);
moea64_pinit(mmu, pm);
bzero(&pm->pm_stats, sizeof(pm->pm_stats));
}
@@ -2074,8 +2075,6 @@ moea64_release(mmu_t mmu, pmap_t pmap)
moea64_release_vsid(VSID_TO_HASH(pmap->pm_sr[0]));
#endif
-
- PMAP_LOCK_DESTROY(pmap);
}
/*
OpenPOWER on IntegriCloud