From owner-svn-src-head@freebsd.org Sun Apr 24 21:35:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5DFB1BCA3; Sun, 24 Apr 2016 21:35:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FDC81D74; Sun, 24 Apr 2016 21:35:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3OLZ1pM070579; Sun, 24 Apr 2016 21:35:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3OLZ1ma070578; Sun, 24 Apr 2016 21:35:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201604242135.u3OLZ1ma070578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 24 Apr 2016 21:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298553 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2016 21:35:02 -0000 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);