Most MIPS systems have a comparatively-sparse physical memory layout. Switch

to using the sparse physseg layout in the VM system.
This commit is contained in:
Juli Mallett 2010-04-24 03:11:35 +00:00
parent ed9dd82fa2
commit 07b9cc2f46
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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;
}