Author: alc Date: Fri Sep 18 17:09:33 2009 New Revision: 197317 URL: http://svn.freebsd.org/changeset/base/197317
Log: When superpages are enabled, add the 2 or 4MB page size to the array of supported page sizes. Reviewed by: jhb MFC after: 3 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Sep 18 17:04:57 2009 (r197316) +++ head/sys/amd64/amd64/pmap.c Fri Sep 18 17:09:33 2009 (r197317) @@ -701,6 +701,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: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Sep 18 17:04:57 2009 (r197316) +++ head/sys/i386/i386/pmap.c Fri Sep 18 17:09:33 2009 (r197317) @@ -702,6 +702,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. _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"