Date: Sun, 24 Apr 2016 21:35:01 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298553 - head/sys/amd64/amd64 Message-ID: <201604242135.u3OLZ1ma070578@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604242135.u3OLZ1ma070578>