Date: Fri, 20 Apr 2018 15:28:59 +0000 (UTC) From: "Jonathan T. Looney" <jtl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332826 - stable/11/sys/amd64/amd64 Message-ID: <201804201528.w3KFSxOT087200@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jtl Date: Fri Apr 20 15:28:58 2018 New Revision: 332826 URL: https://svnweb.freebsd.org/changeset/base/332826 Log: MFC r330510: Prior to r329071, pmap_bootstrap() used pmap_kmem_choose() to round the first available virtual address to a 2MB boundary. After r329071, create_pagetables() rounds firstaddr up to a 2MB boundary. This ensures the kernel is mapped in super-pages, which is the point of the logic in pmap_kmem_choose(). Therefore, it is no longer necessary for pmap_bootstrap() to round up to the 2MB boundary again. As pmap_bootstrap() was the only user of pmap_kmem_choose(), we can delete pmap_kmem_choose(). Sponsored by: Netflix, Inc. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:19:27 2018 (r332825) +++ stable/11/sys/amd64/amd64/pmap.c Fri Apr 20 15:28:58 2018 (r332826) @@ -688,23 +688,7 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_ static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist *free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, struct spglist *); -static vm_offset_t pmap_kmem_choose(vm_offset_t addr); -/* - * Move the kernel virtual free pointer to the next - * 2MB. This is used to help improve performance - * by using a large (2MB) page for much of the kernel - * (.text, .data, .bss) - */ -static vm_offset_t -pmap_kmem_choose(vm_offset_t addr) -{ - vm_offset_t newaddr = addr; - - newaddr = roundup2(addr, NBPDR); - return (newaddr); -} - /********************/ /* Inline functions */ /********************/ @@ -1050,7 +1034,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) vm_phys_add_seg(KPTphys, KPTphys + ptoa(nkpt)); virtual_avail = (vm_offset_t) KERNBASE + *firstaddr; - virtual_avail = pmap_kmem_choose(virtual_avail); virtual_end = VM_MAX_KERNEL_ADDRESS;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804201528.w3KFSxOT087200>