Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Apr 2002 12:45:37 -0700 (PDT)
From:      Thomas Moestl <tmm@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 9665 for review
Message-ID:  <200204131945.g3DJjbQ70016@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9665

Change 9665 by tmm@tmm_sparc64 on 2002/04/13 12:45:19

	The CVS version still uses the old (and more correct) pmap_extract()
	code to get the physical address, so reduce unnecessary diffs to
	it.

Affected files ...

... //depot/projects/sparc64/sys/sparc64/sparc64/vm_machdep.c#51 edit

Differences ...

==== //depot/projects/sparc64/sys/sparc64/sparc64/vm_machdep.c#51 (text+ko) ====

@@ -338,14 +338,16 @@
 {
 	vm_prot_t prot;
 	caddr_t addr, kva;
+	vm_offset_t pa;
 	int pidx;
 	struct vm_page *m;
-	vm_offset_t phys;
+	pmap_t pmap;
 
 	GIANT_REQUIRED;
 
 	KASSERT((bp->b_flags & B_PHYS) != 0, ("vmapbuf: not a B_PHYS buffer"));
 
+	pmap = &curproc->p_vmspace->vm_pmap;
 	/*
 	 * Use the d-cache color of b->b_data (the user space region) for the
 	 * kva region too, to avoid illegal cache aliases which would require
@@ -368,10 +370,9 @@
 		 */
 		vm_fault_quick((addr >= (caddr_t)bp->b_saveaddr) ?
 		    addr : bp->b_saveaddr, prot);
-		phys = pmap_extract(&curproc->p_vmspace->vm_pmap,
-		    (vm_offset_t)addr);
-		KASSERT(phys != 0, ("vmapbuf: page not present"));
-		m = PHYS_TO_VM_PAGE(phys);
+		pa = pmap_extract(pmap, (vm_offset_t)addr);
+		KASSERT(pa != 0, ("vmapbuf: page not present"));
+		m = PHYS_TO_VM_PAGE(pa);
 		vm_page_hold(m);
 		bp->b_pages[pidx] = m;
 		pmap_enter(kernel_pmap, (vm_offset_t)kva, m,

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204131945.g3DJjbQ70016>