Date: Sat, 9 Feb 2013 17:34:48 +0000 (UTC) From: "Cherry G. Mathew" <cherry@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r246597 - projects/amd64_xen_pv/sys/amd64/xen Message-ID: <201302091734.r19HYmSC012278@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302091734.r19HYmSC012278>