From owner-svn-src-head@freebsd.org Sat Jul 15 16:42:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDB4AFD700; Sat, 15 Jul 2017 16:42:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7744E7540E; Sat, 15 Jul 2017 16:42:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6FGgtda043918; Sat, 15 Jul 2017 16:42:55 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6FGgthE043917; Sat, 15 Jul 2017 16:42:55 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707151642.v6FGgthE043917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 15 Jul 2017 16:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321015 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 321015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jul 2017 16:42:56 -0000 Author: alc Date: Sat Jul 15 16:42:55 2017 New Revision: 321015 URL: https://svnweb.freebsd.org/changeset/base/321015 Log: Style-only change: Consistently use the variable name "pdpg" throughout this file. Previously, half of the pointers to a vm_page being used as a page directory page were named "pdpg" and the rest were named "mpde". Discussed with: kib MFC after: 1 week Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jul 15 15:26:38 2017 (r321014) +++ head/sys/amd64/amd64/pmap.c Sat Jul 15 16:42:55 2017 (r321015) @@ -4556,23 +4556,23 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t { pd_entry_t *pde, newpde; pt_entry_t PG_V; - vm_page_t mpde; + vm_page_t pdpg; struct spglist free; PG_V = pmap_valid_bit(pmap); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if ((mpde = pmap_allocpde(pmap, va, NULL)) == NULL) { + if ((pdpg = pmap_allocpde(pmap, va, NULL)) == NULL) { CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); return (FALSE); } - pde = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(mpde)); + pde = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pdpg)); pde = &pde[pmap_pde_index(va)]; if ((*pde & PG_V) != 0) { - KASSERT(mpde->wire_count > 1, - ("pmap_enter_pde: mpde's wire count is too low")); - mpde->wire_count--; + KASSERT(pdpg->wire_count > 1, + ("pmap_enter_pde: pdpg's wire count is too low")); + pdpg->wire_count--; CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); return (FALSE); @@ -4588,7 +4588,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t if (!pmap_pv_insert_pde(pmap, va, VM_PAGE_TO_PHYS(m), lockp)) { SLIST_INIT(&free); - if (pmap_unwire_ptp(pmap, va, mpde, &free)) { + if (pmap_unwire_ptp(pmap, va, pdpg, &free)) { /* * Although "va" is not mapped, paging- * structure caches could nonetheless have @@ -5013,6 +5013,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ vm_offset_t addr; vm_offset_t end_addr = src_addr + len; vm_offset_t va_next; + vm_page_t dst_pdpg, dstmpte, srcmpte; pt_entry_t PG_A, PG_M, PG_V; if (dst_addr != src_addr) @@ -5047,7 +5048,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ for (addr = src_addr; addr < end_addr; addr = va_next) { pt_entry_t *src_pte, *dst_pte; - vm_page_t dstmpde, dstmpte, srcmpte; pml4_entry_t *pml4e; pdp_entry_t *pdpe; pd_entry_t srcptepaddr, *pde; @@ -5083,11 +5083,11 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ if (srcptepaddr & PG_PS) { if ((addr & PDRMASK) != 0 || addr + NBPDR > end_addr) continue; - dstmpde = pmap_allocpde(dst_pmap, addr, NULL); - if (dstmpde == NULL) + dst_pdpg = pmap_allocpde(dst_pmap, addr, NULL); + if (dst_pdpg == NULL) break; pde = (pd_entry_t *) - PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpde)); + PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dst_pdpg)); pde = &pde[pmap_pde_index(addr)]; if (*pde == 0 && ((srcptepaddr & PG_MANAGED) == 0 || pmap_pv_insert_pde(dst_pmap, addr, srcptepaddr & @@ -5096,7 +5096,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_ pmap_resident_count_inc(dst_pmap, NBPDR / PAGE_SIZE); atomic_add_long(&pmap_pde_mappings, 1); } else - dstmpde->wire_count--; + dst_pdpg->wire_count--; continue; } @@ -6447,8 +6447,8 @@ pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_of pdp_entry_t newpdpe, oldpdpe; pd_entry_t *firstpde, newpde, *pde; pt_entry_t PG_A, PG_M, PG_RW, PG_V; - vm_paddr_t mpdepa; - vm_page_t mpde; + vm_paddr_t pdpgpa; + vm_page_t pdpg; PG_A = pmap_accessed_bit(pmap); PG_M = pmap_modified_bit(pmap); @@ -6459,15 +6459,15 @@ pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_of oldpdpe = *pdpe; KASSERT((oldpdpe & (PG_PS | PG_V)) == (PG_PS | PG_V), ("pmap_demote_pdpe: oldpdpe is missing PG_PS and/or PG_V")); - if ((mpde = vm_page_alloc(NULL, va >> PDPSHIFT, VM_ALLOC_INTERRUPT | + if ((pdpg = vm_page_alloc(NULL, va >> PDPSHIFT, VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { CTR2(KTR_PMAP, "pmap_demote_pdpe: failure for va %#lx" " in pmap %p", va, pmap); return (FALSE); } - mpdepa = VM_PAGE_TO_PHYS(mpde); - firstpde = (pd_entry_t *)PHYS_TO_DMAP(mpdepa); - newpdpe = mpdepa | PG_M | PG_A | (oldpdpe & PG_U) | PG_RW | PG_V; + pdpgpa = VM_PAGE_TO_PHYS(pdpg); + firstpde = (pd_entry_t *)PHYS_TO_DMAP(pdpgpa); + newpdpe = pdpgpa | PG_M | PG_A | (oldpdpe & PG_U) | PG_RW | PG_V; KASSERT((oldpdpe & PG_A) != 0, ("pmap_demote_pdpe: oldpdpe is missing PG_A")); KASSERT((oldpdpe & (PG_M | PG_RW)) != PG_RW,