summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/trap.c
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>2000-07-31 14:47:14 +0000
committerluoqi <luoqi@FreeBSD.org>2000-07-31 14:47:14 +0000
commitc3d52a9a3eba0bbe774ab6244b8b977d18fcd900 (patch)
treea97e8f98017ce5776fc63e8349707acbfffd7bdc /sys/amd64/amd64/trap.c
parentb79fdb86f684f885ca011983d3958e06ebafea11 (diff)
downloadFreeBSD-src-c3d52a9a3eba0bbe774ab6244b8b977d18fcd900.zip
FreeBSD-src-c3d52a9a3eba0bbe774ab6244b8b977d18fcd900.tar.gz
Handle write page faults (both write only or read-modify-write) as MI vm
write-only faults. This would allow write-only mmapped regions to function correctly.
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r--sys/amd64/amd64/trap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 3f87909..5a435fe 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -634,7 +634,7 @@ trap_pfault(frame, usermode, eva)
struct proc *p = curproc;
if (frame->tf_err & PGEX_W)
- ftype = VM_PROT_READ | VM_PROT_WRITE;
+ ftype = VM_PROT_WRITE;
else
ftype = VM_PROT_READ;
@@ -772,7 +772,7 @@ trap_pfault(frame, usermode, eva)
}
if (frame->tf_err & PGEX_W)
- ftype = VM_PROT_READ | VM_PROT_WRITE;
+ ftype = VM_PROT_WRITE;
else
ftype = VM_PROT_READ;
@@ -993,7 +993,7 @@ int trapwrite(addr)
/*
* fault the data page
*/
- rv = vm_fault(&vm->vm_map, va, VM_PROT_READ|VM_PROT_WRITE, VM_FAULT_DIRTY);
+ rv = vm_fault(&vm->vm_map, va, VM_PROT_WRITE, VM_FAULT_DIRTY);
--p->p_lock;
OpenPOWER on IntegriCloud