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
sys/mips
include
mips

@ -152,9 +152,9 @@
#define VM_PHYSSEG_MAX 32 #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 * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool

@ -2381,8 +2381,7 @@ pmap_remove_pages(pmap_t pmap)
*pte = is_kernel_pmap(pmap) ? PTE_G : 0; *pte = is_kernel_pmap(pmap) ? PTE_G : 0;
m = PHYS_TO_VM_PAGE(mips_tlbpfn_to_paddr(tpte)); m = PHYS_TO_VM_PAGE(mips_tlbpfn_to_paddr(tpte));
KASSERT(m != NULL,
KASSERT(m < &vm_page_array[vm_page_array_size],
("pmap_remove_pages: bad tpte %x", tpte)); ("pmap_remove_pages: bad tpte %x", tpte));
pv->pv_pmap->pm_stats.resident_count--; 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); 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; vm_page_t m;
m = PHYS_TO_VM_PAGE(pa); m = PHYS_TO_VM_PAGE(pa);
if (m == NULL)
return 0;
if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0)
return 1; return 1;
} }