diff options
author | alc <alc@FreeBSD.org> | 2012-06-01 03:56:12 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2012-06-01 03:56:12 +0000 |
commit | 0ca67337b88c43b8cde13036ab4bad8c9f2ea9b2 (patch) | |
tree | cd28d23733c9b02a2e158a1a79ff72a437c41bf1 /sys/ia64 | |
parent | ff434e7926cfc88843938f4f31f78d7894954311 (diff) | |
download | FreeBSD-src-0ca67337b88c43b8cde13036ab4bad8c9f2ea9b2.zip FreeBSD-src-0ca67337b88c43b8cde13036ab4bad8c9f2ea9b2.tar.gz |
pmap_alloc_vhpt() doesn't need the pages that it allocates to be mapped
into the kernel map, so vm_page_alloc_contig() can be used in place of
contigmalloc().
Reviewed by: marcel
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 5ba5856..8410426 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -289,21 +289,23 @@ pmap_initialize_vhpt(vm_offset_t vhpt) } #ifdef SMP -MALLOC_DECLARE(M_SMP); - vm_offset_t pmap_alloc_vhpt(void) { vm_offset_t vhpt; + vm_page_t m; vm_size_t size; size = 1UL << pmap_vhpt_log2size; - vhpt = (uintptr_t)contigmalloc(size, M_SMP, 0, 0UL, ~0UL, size, 0UL); - if (vhpt != 0) { - vhpt = IA64_PHYS_TO_RR7(ia64_tpa(vhpt)); + m = vm_page_alloc_contig(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED, atop(size), 0UL, ~0UL, size, 0UL, + VM_MEMATTR_DEFAULT); + if (m != NULL) { + vhpt = IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(m)); pmap_initialize_vhpt(vhpt); + return (vhpt); } - return (vhpt); + return (0); } #endif |