Date: Fri, 1 Jun 2012 03:56:13 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r236375 - head/sys/ia64/ia64 Message-ID: <201206010356.q513uDIC081734@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Fri Jun 1 03:56:12 2012 New Revision: 236375 URL: http://svn.freebsd.org/changeset/base/236375 Log: 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 Modified: head/sys/ia64/ia64/pmap.c Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Fri Jun 1 03:46:28 2012 (r236374) +++ head/sys/ia64/ia64/pmap.c Fri Jun 1 03:56:12 2012 (r236375) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206010356.q513uDIC081734>