Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 2009 03:35:25 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189551 - head/sys/amd64/amd64
Message-ID:  <200903090335.n293ZPgA008336@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Mon Mar  9 03:35:25 2009
New Revision: 189551
URL: http://svn.freebsd.org/changeset/base/189551

Log:
  Change pmap_enter_quick_locked() so that it uses the kernel's direct map
  instead of the pmap's recursive mapping to access the lowest level of the
  page table when it maps a user-space virtual address.

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Mon Mar  9 02:37:52 2009	(r189550)
+++ head/sys/amd64/amd64/pmap.c	Mon Mar  9 03:35:25 2009	(r189551)
@@ -3253,17 +3253,12 @@ pmap_enter_quick_locked(pmap_t pmap, vm_
 					return (mpte);
 			}
 		}
+		pte = (pt_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mpte));
+		pte = &pte[pmap_pte_index(va)];
 	} else {
 		mpte = NULL;
+		pte = vtopte(va);
 	}
-
-	/*
-	 * This call to vtopte makes the assumption that we are
-	 * entering the page into the current pmap.  In order to support
-	 * quick entry into any pmap, one would likely use pmap_pte.
-	 * But that isn't as quick as vtopte.
-	 */
-	pte = vtopte(va);
 	if (*pte) {
 		if (mpte != NULL) {
 			mpte->wire_count--;



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