From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 03:56:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6122E1065670; Fri, 1 Jun 2012 03:56:13 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4F48FC1B; Fri, 1 Jun 2012 03:56:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q513uDuh081736; Fri, 1 Jun 2012 03:56:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q513uDIC081734; Fri, 1 Jun 2012 03:56:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206010356.q513uDIC081734@svn.freebsd.org> From: Alan Cox Date: Fri, 1 Jun 2012 03:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236375 - head/sys/ia64/ia64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 03:56:13 -0000 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