From owner-svn-src-stable-7@FreeBSD.ORG Sun Nov 1 08:48:31 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39988106566B; Sun, 1 Nov 2009 08:48:31 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27C6E8FC08; Sun, 1 Nov 2009 08:48:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA18mUJj017841; Sun, 1 Nov 2009 08:48:30 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA18mUNQ017838; Sun, 1 Nov 2009 08:48:30 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200911010848.nA18mUNQ017838@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Nov 2009 08:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198743 - in stable/7/sys: . amd64/amd64 contrib/pf i386/i386 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 08:48:31 -0000 Author: alc Date: Sun Nov 1 08:48:30 2009 New Revision: 198743 URL: http://svn.freebsd.org/changeset/base/198743 Log: MFC r197317 When superpages are enabled, add the 2 or 4MB page size to the array of supported page sizes. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/pmap.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/i386/pmap.c Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Sun Nov 1 08:45:44 2009 (r198742) +++ stable/7/sys/amd64/amd64/pmap.c Sun Nov 1 08:48:30 2009 (r198743) @@ -666,6 +666,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); + if (pg_ps_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } /* * Calculate the size of the pv head table for superpages. Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Sun Nov 1 08:45:44 2009 (r198742) +++ stable/7/sys/i386/i386/pmap.c Sun Nov 1 08:48:30 2009 (r198743) @@ -666,6 +666,11 @@ pmap_init(void) * Are large page mappings enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); + if (pg_ps_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } /* * Calculate the size of the pv head table for superpages.