diff options
-rw-r--r-- | sys/mips/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/mips/mips/pmap.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/mips/include/vmparam.h b/sys/mips/include/vmparam.h index bed5e36398e2..3b9b12e43d04 100644 --- a/sys/mips/include/vmparam.h +++ b/sys/mips/include/vmparam.h @@ -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 diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 32c0f9297975..9c28f23804f8 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -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; } |