[PC-BSD Commits] r2499 - freebsd-projects/nvidia-work/split_large_pages/diff_on_HEAD

svn at pcbsd.org svn at pcbsd.org
Wed Jul 30 21:54:02 PDT 2008


Author: magesh
Date: 2008-07-30 21:54:02 -0700 (Wed, 30 Jul 2008)
New Revision: 2499

Modified:
   freebsd-projects/nvidia-work/split_large_pages/diff_on_HEAD/pmap.c_diff_on_v1.638.patch
Log:
Changed the varible names used to denote cache bits in pmap_change_attr() to better reflect their purpose.


Modified: freebsd-projects/nvidia-work/split_large_pages/diff_on_HEAD/pmap.c_diff_on_v1.638.patch
===================================================================
--- freebsd-projects/nvidia-work/split_large_pages/diff_on_HEAD/pmap.c_diff_on_v1.638.patch	2008-07-31 04:00:24 UTC (rev 2498)
+++ freebsd-projects/nvidia-work/split_large_pages/diff_on_HEAD/pmap.c_diff_on_v1.638.patch	2008-07-31 04:54:02 UTC (rev 2499)
@@ -1,5 +1,5 @@
 --- /sys/amd64/amd64/pmap.c.orig	2008-07-31 09:00:26.000000000 +0530
-+++ /sys/amd64/amd64/pmap.c	2008-07-31 09:21:52.000000000 +0530
++++ /sys/amd64/amd64/pmap.c	2008-07-31 10:17:23.000000000 +0530
 @@ -4250,13 +4250,10 @@ pmap_clear_reference(vm_page_t m)
  
  /* Adjust the cache mode for a 4KB page mapped via a PTE. */
@@ -81,7 +81,7 @@
  int
  pmap_change_attr(vm_offset_t va, vm_size_t size, int mode)
  {
-+	int cbpte, cbpde;
++	int cache_bits_pte, cache_bits_pde;
 +	boolean_t changed = FALSE;
  	vm_offset_t base, offset, tmpva;
  	pdp_entry_t *pdpe;
@@ -90,7 +90,7 @@
  	if (base < DMAP_MIN_ADDRESS)
  		return (EINVAL);
  
-+	cbpde = cbpte = -1;
++	cache_bits_pde = cache_bits_pte = -1;
  	/*
  	 * Pages that aren't mapped aren't supported.  Also break down 2MB pages
  	 * into 4KB pages if required.
@@ -102,9 +102,9 @@
 +			 * memory type, then we need not demote this page. Just
 +			 * increment tmpva to the next 2MB page frame.
 +			 */
-+			if (cbpde < 0)
-+				cbpde = pmap_cache_bits(mode, 1);
-+			if ((*pde & PG_PDE_CACHE_BITS) == cbpde) {
++			if (cache_bits_pde < 0)
++				cache_bits_pde = pmap_cache_bits(mode, 1);
++			if ((*pde & PG_PDE_CACHE_BITS) == cache_bits_pde) {
 +				tmpva = (tmpva + NBPDR) & ~PDRMASK;
 +				continue;
 +			}
@@ -126,21 +126,21 @@
 -			pmap_pde_attr(tmpva, mode);
 -			tmpva += NBPDR;
 -			size -= NBPDR;
-+			if (cbpde < 0)
-+				cbpde = pmap_cache_bits(mode, 1);
-+			if ((*pde & PG_PDE_CACHE_BITS) != cbpde) {
-+				pmap_pde_attr(pde, cbpde);
++			if (cache_bits_pde < 0)
++				cache_bits_pde = pmap_cache_bits(mode, 1);
++			if ((*pde & PG_PDE_CACHE_BITS) != cache_bits_pde) {
++				pmap_pde_attr(pde, cache_bits_pde);
 +				if (!changed)
 +					changed = TRUE;
 +			}
 +			tmpva = (tmpva + NBPDR) & ~PDRMASK;
  		} else {
 -			pmap_pte_attr(tmpva, mode);
-+			if (cbpte < 0)
-+				cbpte = pmap_cache_bits(mode, 0);
++			if (cache_bits_pte < 0)
++				cache_bits_pte = pmap_cache_bits(mode, 0);
 +			pte = vtopte(tmpva);
-+			if ((*pte & PG_PTE_CACHE_BITS) != cbpte) {
-+				pmap_pte_attr(pte, cbpte);
++			if ((*pte & PG_PTE_CACHE_BITS) != cache_bits_pte) {
++				pmap_pte_attr(pte, cache_bits_pte);
 +				if (!changed)
 +					changed = TRUE;
 +			}



More information about the Commits mailing list