diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 5ba585638874..84104262bb12 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