Date: Fri, 31 Jul 2015 14:17:26 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> 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 Message-ID: <201507311417.t6VEHQpc051348@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507311417.t6VEHQpc051348>