From owner-svn-src-head@freebsd.org Sat Aug 18 22:07:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D40910775B7; Sat, 18 Aug 2018 22:07:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 360FE796A1; Sat, 18 Aug 2018 22:07:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A7C31D666; Sat, 18 Aug 2018 22:07:50 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7IM7nJq051093; Sat, 18 Aug 2018 22:07:49 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7IM7m3C051088; Sat, 18 Aug 2018 22:07:48 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201808182207.w7IM7m3C051088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 18 Aug 2018 22:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338030 - in head/sys: dev/amd_ecc_inject dev/drm dev/drm2 vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: dev/amd_ecc_inject dev/drm dev/drm2 vm X-SVN-Commit-Revision: 338030 X-SVN-Commit-Repository: base 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.27 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: Sat, 18 Aug 2018 22:07:50 -0000 Author: alc Date: Sat Aug 18 22:07:48 2018 New Revision: 338030 URL: https://svnweb.freebsd.org/changeset/base/338030 Log: Eliminate the unused arena parameter from kmem_alloc_attr(). Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D16793 Modified: head/sys/dev/amd_ecc_inject/ecc_inject.c head/sys/dev/drm/drm_scatter.c head/sys/dev/drm2/drm_scatter.c head/sys/vm/vm_extern.h head/sys/vm/vm_init.c head/sys/vm/vm_kern.c Modified: head/sys/dev/amd_ecc_inject/ecc_inject.c ============================================================================== --- head/sys/dev/amd_ecc_inject/ecc_inject.c Sat Aug 18 21:21:06 2018 (r338029) +++ head/sys/dev/amd_ecc_inject/ecc_inject.c Sat Aug 18 22:07:48 2018 (r338030) @@ -186,7 +186,7 @@ ecc_ei_inject(int count) KASSERT(bit_mask != 0 && (bit_mask & ~INJ_VECTOR_MASK) == 0, ("bit mask value is outside of range: 0x%x", bit_mask)); - memory = kmem_alloc_attr(kernel_arena, PAGE_SIZE, M_WAITOK, 0, ~0, + memory = kmem_alloc_attr(PAGE_SIZE, M_WAITOK, 0, ~0, VM_MEMATTR_UNCACHEABLE); for (injected = 0; injected < count; injected++) { Modified: head/sys/dev/drm/drm_scatter.c ============================================================================== --- head/sys/dev/drm/drm_scatter.c Sat Aug 18 21:21:06 2018 (r338029) +++ head/sys/dev/drm/drm_scatter.c Sat Aug 18 22:07:48 2018 (r338030) @@ -52,8 +52,8 @@ drm_sg_alloc(struct drm_device *dev, struct drm_scatte entry->busaddr = malloc(entry->pages * sizeof(*entry->busaddr), DRM_MEM_SGLISTS, M_WAITOK | M_ZERO); - entry->vaddr = kmem_alloc_attr(kernel_arena, size, M_WAITOK | M_ZERO, - 0, BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING); + entry->vaddr = kmem_alloc_attr(size, M_WAITOK | M_ZERO, 0, + BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING); if (entry->vaddr == 0) { drm_sg_cleanup(entry); return (ENOMEM); Modified: head/sys/dev/drm2/drm_scatter.c ============================================================================== --- head/sys/dev/drm2/drm_scatter.c Sat Aug 18 21:21:06 2018 (r338029) +++ head/sys/dev/drm2/drm_scatter.c Sat Aug 18 22:07:48 2018 (r338030) @@ -37,8 +37,8 @@ __FBSDID("$FreeBSD$"); static inline vm_offset_t drm_vmalloc_dma(vm_size_t size) { - return kmem_alloc_attr(kernel_arena, size, M_NOWAIT | M_ZERO, - 0, BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING); + return kmem_alloc_attr(size, M_NOWAIT | M_ZERO, 0, + BUS_SPACE_MAXADDR_32BIT, VM_MEMATTR_WRITE_COMBINING); } void drm_sg_cleanup(struct drm_sg_mem * entry) Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Sat Aug 18 21:21:06 2018 (r338029) +++ head/sys/vm/vm_extern.h Sat Aug 18 22:07:48 2018 (r338030) @@ -54,7 +54,7 @@ vm_offset_t kmap_alloc_wait(vm_map_t, vm_size_t); void kmap_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); /* These operate on virtual addresses backed by memory. */ -vm_offset_t kmem_alloc_attr(struct vmem *, vm_size_t size, int flags, +vm_offset_t kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_attr_domain(int domain, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Sat Aug 18 21:21:06 2018 (r338029) +++ head/sys/vm/vm_init.c Sat Aug 18 22:07:48 2018 (r338030) @@ -274,9 +274,8 @@ again: * Try to protect 32-bit DMAable memory from the largest * early alloc of wired mem. */ - firstaddr = kmem_alloc_attr(kernel_arena, size, - M_ZERO | M_NOWAIT, (vm_paddr_t)1 << 32, - ~(vm_paddr_t)0, VM_MEMATTR_DEFAULT); + firstaddr = kmem_alloc_attr(size, M_ZERO | M_NOWAIT, + (vm_paddr_t)1 << 32, ~(vm_paddr_t)0, VM_MEMATTR_DEFAULT); if (firstaddr == 0) #endif firstaddr = kmem_malloc(kernel_arena, size, Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Sat Aug 18 21:21:06 2018 (r338029) +++ head/sys/vm/vm_kern.c Sat Aug 18 22:07:48 2018 (r338030) @@ -220,15 +220,12 @@ retry: } vm_offset_t -kmem_alloc_attr(vmem_t *vmem, vm_size_t size, int flags, vm_paddr_t low, - vm_paddr_t high, vm_memattr_t memattr) +kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, + vm_memattr_t memattr) { struct vm_domainset_iter di; vm_offset_t addr; int domain; - - KASSERT(vmem == kernel_arena, - ("kmem_alloc_attr: Only kernel_arena is supported.")); vm_domainset_iter_malloc_init(&di, kernel_object, &domain, &flags); do {