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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to