svn commit: r246597 - projects/amd64_xen_pv/sys/amd64/xen

Cherry G. Mathew cherry at FreeBSD.org
Sat Feb 9 17:34:49 UTC 2013


Author: cherry
Date: Sat Feb  9 17:34:48 2013
New Revision: 246597
URL: http://svnweb.freebsd.org/changeset/base/246597

Log:
  Remove unnecessary sign extension (48bit upward) masking on va.
  This is relevant only for the pml4t offset calculation.
  
  Approved by: gibbs (implicit)

Modified:
  projects/amd64_xen_pv/sys/amd64/xen/mmu_map.c

Modified: projects/amd64_xen_pv/sys/amd64/xen/mmu_map.c
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/xen/mmu_map.c	Sat Feb  9 17:32:00 2013	(r246596)
+++ projects/amd64_xen_pv/sys/amd64/xen/mmu_map.c	Sat Feb  9 17:34:48 2013	(r246597)
@@ -71,20 +71,12 @@ pml4t_index(uintptr_t va)
 static int
 pdpt_index(uintptr_t va)
 {
-	/* amd64 sign extends 48th bit and upwards */
-	const uint64_t SIGNMASK = (1UL << 48) - 1;
-	va &= SIGNMASK; /* Remove sign extension */
-
 	return ((va & PML4MASK) >> PDPSHIFT);
 }
 
 static int
 pdt_index(uintptr_t va)
 {
-	/* amd64 sign extends 48th bit and upwards */
-	const uint64_t SIGNMASK = (1UL << 48) - 1;
-	va &= SIGNMASK; /* Remove sign extension */
-
 	return ((va & PDPMASK) >> PDRSHIFT);
 }
 
@@ -92,10 +84,6 @@ pdt_index(uintptr_t va)
 static int
 pt_index(uintptr_t va)
 {
-	/* amd64 sign extends 48th bit and upwards */
-	const uint64_t SIGNMASK = (1UL << 48) - 1;
-	va &= SIGNMASK; /* Remove sign extension */
-
 	return ((va & PDRMASK) >> PAGE_SHIFT);
 }
 #endif


More information about the svn-src-projects mailing list