summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/pmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r--sys/amd64/amd64/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 486ec39..22a6c31 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -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);
OpenPOWER on IntegriCloud