Author: jmallett
Date: Sat Apr 24 03:11:35 2010
New Revision: 207139
URL: http://svn.freebsd.org/changeset/base/207139
Log:
Most MIPS systems have a comparatively-sparse physical memory layout. Switch
to using the sparse physseg layout in the VM system.
Modified:
head/sys/mips/include/vmparam.h
head/sys/mips/mips/pmap.c
Modified: head/sys/mips/include/vmparam.h
==============================================================================
--- head/sys/mips/include/vmparam.h Sat Apr 24 00:53:41 2010
(r207138)
+++ head/sys/mips/include/vmparam.h Sat Apr 24 03:11:35 2010
(r207139)
@@ -152,9 +152,9 @@
#define VM_PHYSSEG_MAX 32
/*
- * The physical address space is densely populated.
+ * The physical address space is sparsely populated.
*/
-#define VM_PHYSSEG_DENSE
+#define VM_PHYSSEG_SPARSE
/*
* Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool
Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c Sat Apr 24 00:53:41 2010 (r207138)
+++ head/sys/mips/mips/pmap.c Sat Apr 24 03:11:35 2010 (r207139)
@@ -2381,8 +2381,7 @@ pmap_remove_pages(pmap_t pmap)
*pte = is_kernel_pmap(pmap) ? PTE_G : 0;
m = PHYS_TO_VM_PAGE(mips_tlbpfn_to_paddr(tpte));
-
- KASSERT(m < &vm_page_array[vm_page_array_size],
+ KASSERT(m != NULL,
("pmap_remove_pages: bad tpte %x", tpte));
pv->pv_pmap->pm_stats.resident_count--;
@@ -2984,10 +2983,12 @@ page_is_managed(vm_offset_t pa)
{
vm_offset_t pgnum = mips_btop(pa);
- if (pgnum >= first_page && (pgnum < (first_page + vm_page_array_size)))
{
+ if (pgnum >= first_page) {
vm_page_t m;
m = PHYS_TO_VM_PAGE(pa);
+ if (m == NULL)
+ return 0;
if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0)
return 1;
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"