svn commit: r198743 - in stable/7/sys: . amd64/amd64 contrib/pf
i386/i386
Alan Cox
alc at FreeBSD.org
Sun Nov 1 08:48:31 UTC 2009
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.
More information about the svn-src-stable
mailing list