diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2010-04-24 03:11:35 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2010-04-24 03:11:35 +0000 |
commit | 07b9cc2f468471a723504ac789201a84f6dcd38a (patch) | |
tree | b866c0ef762e7c27be91a59e9d6d3eafd272ca3a | |
parent | ed9dd82fa253046e161b98fca9db198a1f267313 (diff) | |
download | src-07b9cc2f468471a723504ac789201a84f6dcd38a.tar.gz src-07b9cc2f468471a723504ac789201a84f6dcd38a.zip |
Most MIPS systems have a comparatively-sparse physical memory layout. Switch
to using the sparse physseg layout in the VM system.
Notes
Notes:
svn path=/head/; revision=207139
-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; } |