Module Name:    src
Committed By:   uebayasi
Date:           Sun Jan 31 07:47:29 UTC 2010

Modified Files:
        src/sys/uvm: uvm_fault.c

Log Message:
Indent.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/uvm/uvm_fault.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.135 src/sys/uvm/uvm_fault.c:1.136
--- src/sys/uvm/uvm_fault.c:1.135	Sun Jan 31 07:46:03 2010
+++ src/sys/uvm/uvm_fault.c	Sun Jan 31 07:47:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $	*/
+/*	$NetBSD: uvm_fault.c,v 1.136 2010/01/31 07:47:29 uebayasi Exp $	*/
 
 /*
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.136 2010/01/31 07:47:29 uebayasi Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -1051,105 +1051,105 @@
 		goto lower_fault_lookup_done;
 	}
 
-		mutex_enter(&uobj->vmobjlock);
-		/* locked (!shadowed): maps(read), amap (if there), uobj */
-		/*
-		 * the following call to pgo_get does _not_ change locking state
-		 */
+	mutex_enter(&uobj->vmobjlock);
+	/* locked (!shadowed): maps(read), amap (if there), uobj */
+	/*
+	 * the following call to pgo_get does _not_ change locking state
+	 */
 
-		uvmexp.fltlget++;
-		gotpages = npages;
-		(void) uobj->pgops->pgo_get(uobj, ufi.entry->offset + eoff,
-				pages, &gotpages, centeridx,
-				access_type & MASK(ufi.entry),
-				ufi.entry->advice, PGO_LOCKED);
+	uvmexp.fltlget++;
+	gotpages = npages;
+	(void) uobj->pgops->pgo_get(uobj, ufi.entry->offset + eoff,
+			pages, &gotpages, centeridx,
+			access_type & MASK(ufi.entry),
+			ufi.entry->advice, PGO_LOCKED);
 
-		/*
-		 * check for pages to map, if we got any
-		 */
-
-		uobjpage = NULL;
+	/*
+	 * check for pages to map, if we got any
+	 */
 
-		if (gotpages == 0)
-			goto lower_fault_lookup_done;
+	uobjpage = NULL;
 
-			currva = startva;
-			for (lcv = 0; lcv < npages;
-			     lcv++, currva += PAGE_SIZE) {
-				struct vm_page *curpg;
-				bool readonly;
-
-				curpg = pages[lcv];
-				if (curpg == NULL || curpg == PGO_DONTCARE) {
-					continue;
-				}
-				KASSERT(curpg->uobject == uobj);
+	if (gotpages == 0)
+		goto lower_fault_lookup_done;
 
-				/*
-				 * if center page is resident and not
-				 * PG_BUSY|PG_RELEASED then pgo_get
-				 * made it PG_BUSY for us and gave
-				 * us a handle to it.   remember this
-				 * page as "uobjpage." (for later use).
-				 */
+	currva = startva;
+	for (lcv = 0; lcv < npages;
+	     lcv++, currva += PAGE_SIZE) {
+		struct vm_page *curpg;
+		bool readonly;
 
-				if (lcv == centeridx) {
-					uobjpage = curpg;
-					UVMHIST_LOG(maphist, "  got uobjpage "
-					    "(0x%x) with locked get",
-					    uobjpage, 0,0,0);
-					continue;
-				}
+		curpg = pages[lcv];
+		if (curpg == NULL || curpg == PGO_DONTCARE) {
+			continue;
+		}
+		KASSERT(curpg->uobject == uobj);
 
-				/*
-				 * calling pgo_get with PGO_LOCKED returns us
-				 * pages which are neither busy nor released,
-				 * so we don't need to check for this.
-				 * we can just directly enter the pages.
-				 */
+		/*
+		 * if center page is resident and not
+		 * PG_BUSY|PG_RELEASED then pgo_get
+		 * made it PG_BUSY for us and gave
+		 * us a handle to it.   remember this
+		 * page as "uobjpage." (for later use).
+		 */
 
-				mutex_enter(&uvm_pageqlock);
-				uvm_pageenqueue(curpg);
-				mutex_exit(&uvm_pageqlock);
-				UVMHIST_LOG(maphist,
-				  "  MAPPING: n obj: pm=0x%x, va=0x%x, pg=0x%x",
-				  ufi.orig_map->pmap, currva, curpg, 0);
-				uvmexp.fltnomap++;
+		if (lcv == centeridx) {
+			uobjpage = curpg;
+			UVMHIST_LOG(maphist, "  got uobjpage "
+			    "(0x%x) with locked get",
+			    uobjpage, 0,0,0);
+			continue;
+		}
 
-				/*
-				 * Since this page isn't the page that's
-				 * actually faulting, ignore pmap_enter()
-				 * failures; it's not critical that we
-				 * enter these right now.
-				 */
-				KASSERT((curpg->flags & PG_PAGEOUT) == 0);
-				KASSERT((curpg->flags & PG_RELEASED) == 0);
-				KASSERT(!UVM_OBJ_IS_CLEAN(curpg->uobject) ||
-				    (curpg->flags & PG_CLEAN) != 0);
-				readonly = (curpg->flags & PG_RDONLY)
-				    || (curpg->loan_count > 0)
-				    || UVM_OBJ_NEEDS_WRITEFAULT(curpg->uobject);
-
-				(void) pmap_enter(ufi.orig_map->pmap, currva,
-				    VM_PAGE_TO_PHYS(curpg),
-				    readonly ?
-				    enter_prot & ~VM_PROT_WRITE :
-				    enter_prot & MASK(ufi.entry),
-				    PMAP_CANFAIL |
-				     (wired ? PMAP_WIRED : 0));
+		/*
+		 * calling pgo_get with PGO_LOCKED returns us
+		 * pages which are neither busy nor released,
+		 * so we don't need to check for this.
+		 * we can just directly enter the pages.
+		 */
 
-				/*
-				 * NOTE: page can't be PG_WANTED or PG_RELEASED
-				 * because we've held the lock the whole time
-				 * we've had the handle.
-				 */
-				KASSERT((curpg->flags & PG_WANTED) == 0);
-				KASSERT((curpg->flags & PG_RELEASED) == 0);
+		mutex_enter(&uvm_pageqlock);
+		uvm_pageenqueue(curpg);
+		mutex_exit(&uvm_pageqlock);
+		UVMHIST_LOG(maphist,
+		  "  MAPPING: n obj: pm=0x%x, va=0x%x, pg=0x%x",
+		  ufi.orig_map->pmap, currva, curpg, 0);
+		uvmexp.fltnomap++;
+
+		/*
+		 * Since this page isn't the page that's
+		 * actually faulting, ignore pmap_enter()
+		 * failures; it's not critical that we
+		 * enter these right now.
+		 */
+		KASSERT((curpg->flags & PG_PAGEOUT) == 0);
+		KASSERT((curpg->flags & PG_RELEASED) == 0);
+		KASSERT(!UVM_OBJ_IS_CLEAN(curpg->uobject) ||
+		    (curpg->flags & PG_CLEAN) != 0);
+		readonly = (curpg->flags & PG_RDONLY)
+		    || (curpg->loan_count > 0)
+		    || UVM_OBJ_NEEDS_WRITEFAULT(curpg->uobject);
+
+		(void) pmap_enter(ufi.orig_map->pmap, currva,
+		    VM_PAGE_TO_PHYS(curpg),
+		    readonly ?
+		    enter_prot & ~VM_PROT_WRITE :
+		    enter_prot & MASK(ufi.entry),
+		    PMAP_CANFAIL |
+		     (wired ? PMAP_WIRED : 0));
+
+		/*
+		 * NOTE: page can't be PG_WANTED or PG_RELEASED
+		 * because we've held the lock the whole time
+		 * we've had the handle.
+		 */
+		KASSERT((curpg->flags & PG_WANTED) == 0);
+		KASSERT((curpg->flags & PG_RELEASED) == 0);
 
-				curpg->flags &= ~(PG_BUSY);
-				UVM_PAGE_OWN(curpg, NULL);
-			}
-			pmap_update(ufi.orig_map->pmap);
+		curpg->flags &= ~(PG_BUSY);
+		UVM_PAGE_OWN(curpg, NULL);
+	}
+	pmap_update(ufi.orig_map->pmap);
 
 lower_fault_lookup_done:
 	{}

Reply via email to