summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke
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/booke
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/booke')
-rw-r--r--sys/powerpc/booke/pmap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c
index b2b958f..d5c64ed 100644
--- a/sys/powerpc/booke/pmap.c
+++ b/sys/powerpc/booke/pmap.c
@@ -1477,6 +1477,7 @@ static void
mmu_booke_pinit0(mmu_t mmu, pmap_t pmap)
{
+ PMAP_LOCK_INIT(pmap);
mmu_booke_pinit(mmu, pmap);
PCPU_SET(curpmap, pmap);
}
@@ -1495,7 +1496,6 @@ mmu_booke_pinit(mmu_t mmu, pmap_t pmap)
KASSERT((pmap != kernel_pmap), ("pmap_pinit: initializing kernel_pmap"));
- PMAP_LOCK_INIT(pmap);
for (i = 0; i < MAXCPU; i++)
pmap->pm_tid[i] = TID_NONE;
CPU_ZERO(&kernel_pmap->pm_active);
@@ -1516,8 +1516,6 @@ mmu_booke_release(mmu_t mmu, pmap_t pmap)
KASSERT(pmap->pm_stats.resident_count == 0,
("pmap_release: pmap resident count %ld != 0",
pmap->pm_stats.resident_count));
-
- PMAP_LOCK_DESTROY(pmap);
}
/*
OpenPOWER on IntegriCloud