aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2004-07-30 20:38:30 +0000
committerAlan Cox <alc@FreeBSD.org>2004-07-30 20:38:30 +0000
commit9bb0e0686177321598c25b25527322951d7c2c87 (patch)
treefaa2860aa76235455158a6f157cb6600621e1bb2 /sys/sparc64
parent9be60284a61cba925961107135ac54d265afff20 (diff)
downloadsrc-9bb0e0686177321598c25b25527322951d7c2c87.tar.gz
src-9bb0e0686177321598c25b25527322951d7c2c87.zip
- 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.)
Notes
Notes: svn path=/head/; revision=132899
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/pmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c
index 304d81b98861..91ec4ff7d073 100644
--- a/sys/sparc64/sparc64/pmap.c
+++ b/sys/sparc64/sparc64/pmap.c
@@ -1208,13 +1208,16 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
pm->pm_context[PCPU_GET(cpuid)], sva, eva, prot);
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
+ mtx_lock(&Giant);
pmap_remove(pm, sva, eva);
+ mtx_unlock(&Giant);
return;
}
if (prot & VM_PROT_WRITE)
return;
+ mtx_lock(&Giant);
vm_page_lock_queues();
if (eva - sva > PMAP_TSB_THRESH) {
tsb_foreach(pm, NULL, sva, eva, pmap_protect_tte);
@@ -1227,6 +1230,7 @@ pmap_protect(pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
tlb_range_demap(pm, sva, eva - 1);
}
vm_page_unlock_queues();
+ mtx_unlock(&Giant);
}
/*