Author: alc
Date: Sat Oct 31 19:02:08 2009
New Revision: 198729
URL: http://svn.freebsd.org/changeset/base/198729

Log:
  MFC r197317
    When superpages are enabled, add the 2 or 4MB page size to the array of
    supported page sizes.

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/amd64/pmap.c
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/i386/i386/pmap.c

Modified: stable/8/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/8/sys/amd64/amd64/pmap.c     Sat Oct 31 18:54:26 2009        
(r198728)
+++ stable/8/sys/amd64/amd64/pmap.c     Sat Oct 31 19:02:08 2009        
(r198729)
@@ -663,6 +663,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/8/sys/i386/i386/pmap.c
==============================================================================
--- stable/8/sys/i386/i386/pmap.c       Sat Oct 31 18:54:26 2009        
(r198728)
+++ stable/8/sys/i386/i386/pmap.c       Sat Oct 31 19:02:08 2009        
(r198729)
@@ -673,6 +673,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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to