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.
This commit is contained in:
luoqi 2000-07-31 14:47:14 +00:00
parent b79fdb86f6
commit c3d52a9a3e
3 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;