diff options
author | cem <cem@FreeBSD.org> | 2016-04-24 21:35:01 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2016-04-24 21:35:01 +0000 |
commit | 241a3b76d8136a83d5c3d5f5c144f5a192b56cb8 (patch) | |
tree | 3d2ec5a87906fa4eb23884fe51dc2755f2aa6557 /sys/amd64/amd64/pmap.c | |
parent | cc4cad82b53d4333fe0628231f448df78441c84b (diff) | |
download | FreeBSD-src-241a3b76d8136a83d5c3d5f5c144f5a192b56cb8.zip FreeBSD-src-241a3b76d8136a83d5c3d5f5c144f5a192b56cb8.tar.gz |
AMD64 pmap: Use howmany() macro
Use param.h howmany() instead of hand-rolled version.
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 |
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); |