summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-07-30 20:38:30 +0000
committeralc <alc@FreeBSD.org>2004-07-30 20:38:30 +0000
commit9b295c2fd92cb825970d373cd60cb8e6a71ec98e (patch)
treefaa2860aa76235455158a6f157cb6600621e1bb2 /sys/arm
parent6aaed2f8eac02130cae5b38ed6a2f86d01f68e15 (diff)
downloadFreeBSD-src-9b295c2fd92cb825970d373cd60cb8e6a71ec98e.zip
FreeBSD-src-9b295c2fd92cb825970d373cd60cb8e6a71ec98e.tar.gz
- Push down the acquisition and release of Giant into pmap_protect() on
those architectures without pmap locking. - Eliminate the acquisition and release of Giant from vm_map_protect(). (Translation: mprotect(2) runs to completion without touching Giant on alpha, amd64, i386 and ia64.)
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/pmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c
index 8a03f76..d776a0a 100644
--- a/sys/arm/arm/pmap.c
+++ b/sys/arm/arm/pmap.c
@@ -3014,7 +3014,9 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
int flush;
if ((prot & VM_PROT_READ) == 0) {
+ mtx_lock(&Giant);
pmap_remove(pm, sva, eva);
+ mtx_unlock(&Giant);
return;
}
@@ -3026,6 +3028,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
return;
}
+ mtx_lock(&Giant);
/*
* OK, at this point, we know we're doing write-protect operation.
@@ -3091,6 +3094,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
pmap_tlb_flushD(pm);
}
+ mtx_unlock(&Giant);
}
OpenPOWER on IntegriCloud