AMD64 pmap: Use howmany() macro

Use param.h howmany() instead of hand-rolled version.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Conrad Meyer 2016-04-24 21:35:01 +00:00
parent a48214425f
commit 0e3f9e5bdd

View File

@ -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);