svn commit: r298553 - head/sys/amd64/amd64

Conrad E. Meyer cem at FreeBSD.org
Sun Apr 24 21:35:02 UTC 2016


Author: cem
Date: Sun Apr 24 21:35:01 2016
New Revision: 298553
URL: https://svnweb.freebsd.org/changeset/base/298553

Log:
  AMD64 pmap: Use howmany() macro
  
  Use param.h howmany() instead of hand-rolled version.
  
  Sponsored by:	EMC / Isilon Storage Division

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

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Sun Apr 24 21:19:00 2016	(r298552)
+++ head/sys/amd64/amd64/pmap.c	Sun Apr 24 21:35:01 2016	(r298553)
@@ -721,7 +721,7 @@ create_pagetables(vm_paddr_t *firstaddr)
 	pml4_entry_t *p4_p;
 
 	/* Allocate page table pages for the direct map */
-	ndmpdp = (ptoa(Maxmem) + NBPDP - 1) >> PDPSHIFT;
+	ndmpdp = howmany(ptoa(Maxmem), NBPDP);
 	if (ndmpdp < 4)		/* Minimum 4GB of dirmap */
 		ndmpdp = 4;
 	ndmpdpphys = howmany(ndmpdp, NPDPEPG);


More information about the svn-src-head mailing list