Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 15:10:17 +0000 (UTC)
From:      "Jonathan T. Looney" <jtl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330510 - head/sys/amd64/amd64
Message-ID:  <201803051510.w25FAHVl019369@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jtl
Date: Mon Mar  5 15:10:17 2018
New Revision: 330510
URL: https://svnweb.freebsd.org/changeset/base/330510

Log:
  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

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Mon Mar  5 14:54:01 2018	(r330509)
+++ head/sys/amd64/amd64/pmap.c	Mon Mar  5 15:10:17 2018	(r330510)
@@ -687,23 +687,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 */
 /********************/
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803051510.w25FAHVl019369>