svn commit: r352303 - head/sys/riscv/riscv

Konstantin Belousov kib at FreeBSD.org
Fri Sep 13 20:17:15 UTC 2019


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;


More information about the svn-src-all mailing list