summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-11-27 20:24:11 +0000
committeralc <alc@FreeBSD.org>2009-11-27 20:24:11 +0000
commitdcb93e6c955b320316982f0c9532ae0b0f8663ea (patch)
tree9e63971c27f696abb5bbb78d4c260e9f2c8d89a6 /sys/sparc64
parenta855bffe7835f373e9b80eba00b37a339bac226e (diff)
downloadFreeBSD-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/sparc64')
-rw-r--r--sys/sparc64/sparc64/trap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index 0c07eaf..686fcba 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -409,7 +409,6 @@ trap_pfault(struct thread *td, struct trapframe *tf)
vm_prot_t prot;
vm_map_entry_t entry;
u_long ctx;
- int flags;
int type;
int rv;
@@ -429,15 +428,13 @@ trap_pfault(struct thread *td, struct trapframe *tf)
CTR4(KTR_TRAP, "trap_pfault: td=%p pm_ctx=%#lx va=%#lx ctx=%#lx",
td, p->p_vmspace->vm_pmap.pm_context[curcpu], va, ctx);
- 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) {
@@ -463,7 +460,7 @@ trap_pfault(struct thread *td, struct trapframe *tf)
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.
OpenPOWER on IntegriCloud