]> xenbits.xensource.com Git - freebsd.git/commitdiff
riscv trap_pfault: remove unneeded hold of the process around vm_fault() call.
authorkib <kib@FreeBSD.org>
Fri, 13 Sep 2019 20:17:14 +0000 (20:17 +0000)
committerkib <kib@FreeBSD.org>
Fri, 13 Sep 2019 20:17:14 +0000 (20:17 +0000)
This is re-appearance of the nop code removed from other arches in r287625.

Reviewed by: alc (as part of the larger patch), markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
DIfferential revision: https://reviews.freebsd.org/D21645

sys/riscv/riscv/trap.c

index 85453a751f2d00b28ad8b9de8b72be63459c6329..e0f34829bb434347624e18acaf517bcaa4942d40 100644 (file)
@@ -217,29 +217,7 @@ data_abort(struct trapframe *frame, int usermode)
        if (pmap_fault_fixup(map->pmap, va, ftype))
                goto done;
 
-       if (map != kernel_map) {
-               /*
-                * Keep swapout from messing with us during this
-                *      critical time.
-                */
-               PROC_LOCK(p);
-               ++p->p_lock;
-               PROC_UNLOCK(p);
-
-               /* Fault in the user page: */
-               error = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
-
-               PROC_LOCK(p);
-               --p->p_lock;
-               PROC_UNLOCK(p);
-       } else {
-               /*
-                * Don't have to worry about process locking or stacks in the
-                * kernel.
-                */
-               error = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
-       }
-
+       error = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
        if (error != KERN_SUCCESS) {
                if (usermode) {
                        sig = SIGSEGV;