From owner-svn-src-head@freebsd.org Fri Jul 31 14:17:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B2079AECA3; Fri, 31 Jul 2015 14:17:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F41F71871; Fri, 31 Jul 2015 14:17:28 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6VEHSeD051352; Fri, 31 Jul 2015 14:17:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6VEHQpc051348; Fri, 31 Jul 2015 14:17:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201507311417.t6VEHQpc051348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 31 Jul 2015 14:17:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286130 - in head/sys: arm64/arm64 arm64/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 31 Jul 2015 14:17:29 -0000 Author: andrew Date: Fri Jul 31 14:17:26 2015 New Revision: 286130 URL: https://svnweb.freebsd.org/changeset/base/286130 Log: Add support for uma_small_alloc and uma_small_free, and make use of these. This is copied from the amd64 version with minor changes. These should be merged into a single file as from a quick look there are other copies of the same file in other parts of the tree. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/arm64/uma_machdep.c - copied, changed from r286078, head/sys/amd64/amd64/uma_machdep.c Modified: head/sys/arm64/arm64/vm_machdep.c head/sys/arm64/include/vmparam.h head/sys/conf/files.arm64 Copied and modified: head/sys/arm64/arm64/uma_machdep.c (from r286078, head/sys/amd64/amd64/uma_machdep.c) ============================================================================== --- head/sys/amd64/amd64/uma_machdep.c Thu Jul 30 15:47:53 2015 (r286078, copy source) +++ head/sys/arm64/arm64/uma_machdep.c Fri Jul 31 14:17:26 2015 (r286130) @@ -61,11 +61,9 @@ uma_small_alloc(uma_zone_t zone, vm_size break; } pa = m->phys_addr; - if ((wait & M_NODUMP) == 0) - dump_add_page(pa); va = (void *)PHYS_TO_DMAP(pa); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) - pagezero(va); + bzero(va, PAGE_SIZE); return (va); } @@ -76,7 +74,6 @@ uma_small_free(void *mem, vm_size_t size vm_paddr_t pa; pa = DMAP_TO_PHYS((vm_offset_t)mem); - dump_drop_page(pa); m = PHYS_TO_VM_PAGE(pa); m->wire_count--; vm_page_free(m); Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Fri Jul 31 13:39:51 2015 (r286129) +++ head/sys/arm64/arm64/vm_machdep.c Fri Jul 31 14:17:26 2015 (r286130) @@ -258,18 +258,3 @@ swi_vm(void *v) /* Nothing to do here - busdma bounce buffers are not implemented. */ } - -void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) -{ - - panic("ARM64TODO: uma_small_alloc"); -} - -void -uma_small_free(void *mem, vm_size_t size, u_int8_t flags) -{ - - panic("ARM64TODO: uma_small_free"); -} - Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Fri Jul 31 13:39:51 2015 (r286129) +++ head/sys/arm64/include/vmparam.h Fri Jul 31 14:17:26 2015 (r286130) @@ -224,6 +224,8 @@ #define VM_INITIAL_PAGEIN 16 #endif +#define UMA_MD_SMALL_ALLOC + extern u_int tsb_kernel_ldd_phys; extern vm_offset_t vm_max_kernel_address; extern vm_offset_t init_pt_va; Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Fri Jul 31 13:39:51 2015 (r286129) +++ head/sys/conf/files.arm64 Fri Jul 31 14:17:26 2015 (r286130) @@ -46,6 +46,7 @@ arm64/arm64/swtch.S standard arm64/arm64/sys_machdep.c standard arm64/arm64/trap.c standard arm64/arm64/uio_machdep.c standard +arm64/arm64/uma_machdep.c standard arm64/arm64/unwind.c optional ddb | kdtrace_hooks arm64/arm64/vfp.c standard arm64/arm64/vm_machdep.c standard