From owner-svn-src-all@freebsd.org Wed Oct 21 17:41:22 2015 Return-Path: Delivered-To: svn-src-all@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 381CEA1BCD0; Wed, 21 Oct 2015 17:41:22 +0000 (UTC) (envelope-from ian@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 mx1.freebsd.org (Postfix) with ESMTPS id DD0DA1CB2; Wed, 21 Oct 2015 17:41:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LHfK0o048935; Wed, 21 Oct 2015 17:41:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LHfKjv048934; Wed, 21 Oct 2015 17:41:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211741.t9LHfKjv048934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 17:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289708 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2015 17:41:22 -0000 Author: ian Date: Wed Oct 21 17:41:20 2015 New Revision: 289708 URL: https://svnweb.freebsd.org/changeset/base/289708 Log: Free memory back into the categories it was allocated from. Noticed by: sbruno Pointy hat: ian Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 17:27:43 2015 (r289707) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 17:41:20 2015 (r289708) @@ -340,14 +340,15 @@ _busdma_alloc_dmamap(bus_dma_tag_t dmat) if (map != NULL) map->slist = slist; else - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); return (map); } static __inline void _busdma_free_dmamap(bus_dmamap_t map) { - free(map->slist, M_DEVBUF); + + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); } @@ -439,7 +440,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, /* Must bounce */ if ((error = alloc_bounce_zone(newtag)) != 0) { - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); return (error); } bz = newtag->bounce_zone; @@ -458,7 +459,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, } else newtag->bounce_zone = NULL; if (error != 0) - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); else *dmat = newtag; CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", @@ -485,8 +486,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { if (dmat->segments != NULL) - free(dmat->segments, M_DEVBUF); - free(dmat, M_DEVBUF); + free(dmat->segments, M_BUSDMA); + free(dmat, M_BUSDMA); /* * Last reference count, so * release our reference @@ -724,7 +725,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - free(map->slist, M_DEVBUF); + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); @@ -1348,7 +1349,7 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u PAGE_SIZE, 0); if (bpage->vaddr == 0) { - free(bpage, M_DEVBUF); + free(bpage, M_BUSDMA); break; } bpage->busaddr = pmap_kextract(bpage->vaddr);