From 886958fbdb615be64b3902f64ab21d5c011aaf21 Mon Sep 17 00:00:00 2001 From: jtl Date: Mon, 5 Mar 2018 15:10:17 +0000 Subject: [PATCH] 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(). Reviewed by: kib MFC after: 2 weeks X-MFC-with: r329071 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14355 --- sys/amd64/amd64/pmap.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 16486377adc4..188866f817d2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -687,22 +687,6 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, 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 */ @@ -1049,7 +1033,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;