diff options
author | alc <alc@FreeBSD.org> | 2009-11-27 20:24:11 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2009-11-27 20:24:11 +0000 |
commit | dcb93e6c955b320316982f0c9532ae0b0f8663ea (patch) | |
tree | 9e63971c27f696abb5bbb78d4c260e9f2c8d89a6 /sys/sun4v | |
parent | a855bffe7835f373e9b80eba00b37a339bac226e (diff) | |
download | FreeBSD-src-dcb93e6c955b320316982f0c9532ae0b0f8663ea.zip FreeBSD-src-dcb93e6c955b320316982f0c9532ae0b0f8663ea.tar.gz |
Simplify the invocation of vm_fault(). Specifically, eliminate the flag
VM_FAULT_DIRTY. The information provided by this flag can be trivially
inferred by vm_fault().
Discussed with: kib
Diffstat (limited to 'sys/sun4v')
-rw-r--r-- | sys/sun4v/sun4v/trap.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/sun4v/sun4v/trap.c b/sys/sun4v/sun4v/trap.c index 353462d..702fd5c 100644 --- a/sys/sun4v/sun4v/trap.c +++ b/sys/sun4v/sun4v/trap.c @@ -460,7 +460,6 @@ trap_pfault(struct thread *td, struct trapframe *tf, int64_t type, uint64_t data vm_offset_t va; vm_prot_t prot; u_long ctx; - int flags; int rv; if (td == NULL) @@ -487,15 +486,13 @@ trap_pfault(struct thread *td, struct trapframe *tf, int64_t type, uint64_t data KASSERT(td->td_proc->p_vmspace != NULL, ("trap_pfault: vmspace NULL")); - if (type == T_DATA_PROTECTION) { + if (type == T_DATA_PROTECTION) prot = VM_PROT_WRITE; - flags = VM_FAULT_DIRTY; - } else { + else { if (type == T_DATA_MISS) prot = VM_PROT_READ; else prot = VM_PROT_READ | VM_PROT_EXECUTE; - flags = VM_FAULT_NORMAL; } if (ctx != TLB_CTX_KERNEL) { @@ -521,7 +518,7 @@ trap_pfault(struct thread *td, struct trapframe *tf, int64_t type, uint64_t data PROC_UNLOCK(p); /* Fault in the user page. */ - rv = vm_fault(&vm->vm_map, va, prot, flags); + rv = vm_fault(&vm->vm_map, va, prot, VM_FAULT_NORMAL); /* * Now the process can be swapped again. |