Date: Fri, 13 Sep 2019 20:17:14 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352303 - head/sys/riscv/riscv Message-ID: <201909132017.x8DKHEJi024848@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Sep 13 20:17:14 2019 New Revision: 352303 URL: https://svnweb.freebsd.org/changeset/base/352303 Log: riscv trap_pfault: remove unneeded hold of the process around vm_fault() call. 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 Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Fri Sep 13 16:50:57 2019 (r352302) +++ head/sys/riscv/riscv/trap.c Fri Sep 13 20:17:14 2019 (r352303) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909132017.x8DKHEJi024848>