From owner-freebsd-mips@FreeBSD.ORG Wed Aug 29 05:01:45 2012 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1D34106566B for ; Wed, 29 Aug 2012 05:01:45 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm16-vm0.bullet.mail.ac4.yahoo.com (nm16-vm0.bullet.mail.ac4.yahoo.com [98.139.52.238]) by mx1.freebsd.org (Postfix) with SMTP id 535108FC18 for ; Wed, 29 Aug 2012 05:01:45 +0000 (UTC) Received: from [98.139.52.195] by nm16.bullet.mail.ac4.yahoo.com with NNFMP; 29 Aug 2012 05:01:39 -0000 Received: from [98.139.52.147] by tm8.bullet.mail.ac4.yahoo.com with NNFMP; 29 Aug 2012 05:01:39 -0000 Received: from [127.0.0.1] by omp1030.mail.ac4.yahoo.com with NNFMP; 29 Aug 2012 05:01:39 -0000 X-Yahoo-Newman-Id: 643645.94976.bm@omp1030.mail.ac4.yahoo.com Received: (qmail 72365 invoked from network); 29 Aug 2012 05:01:09 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=Bewsc2VfgInpbgqDSsBq0VSXTX/BfSEnR4UlXwkt79+G3vBvNJ4Q/sKIC2HfGdbFeV6Il2J586P+sqyvH7qcIKaQfAdcImZ3Xf/T4Ggbm8mbRCmgm7UZBDqMm3oA42HNIE8NovD2uXbeIVhF3kxgIH4RFt3D/4rqItT8ka/Yo10= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346216469; bh=kyrYnPmISV3Ti+ptfYHVz56cBptozyTUZOvupOsElf4=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=6gZizDy4lcHN2uuTfIA5R6rne2c4n0+5oz4ZROBAEk5iFth26HYAN70/x4oUJReUKtFHZ96LqvtYijjx5U2mzxwbjjBnKTW0UJaX9tpWBm0p7MEOsPbOE5I1jJmakfkDhsSePIIHHv+idu0yVtbNyfL/QDf8wsxliCCTjfQM5vI= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: zyaXTe8VM1n8KQTe16NeaO2tqCeiuKfjvaOCoP4HhZsT43R UbZKEEOPTPU9JdObT6oTV7KBAKatCBgYYoDh_BgbFJ2WuGOhkbkHMrrMvNZ7 GMxbhyjMcdEsoROjOgDFaW6WEQxjnSKBJZw_7idjaJytNuIXnpWFzndM_wVy 9piiwtuDaXtlEtqM2I0UgKmPtNZJGuKL1PLeYKU8144pJzBblU.e_R0P6CI3 07zaxCoFqCNtZRmM81DDdrM_tFLIV5dYp6XIwefnDIJA3D9B9eb8LqNrQxqL WO9bKnY6JLV9gyco1H5a5Tgk3i4QsgIFhatY1kgWyzgmdsZ6k.FLbchWY.8a BfRsfchapX8Cng51HO7IEVR0hcMAnazfK4px0zZ2q7kRuQgK_FWPs9JoJh3c f1z_4Rclj8NLEbR0VYo0nldjcQuDrau94K1wJY0LqCk72pnLnbSfFDC94sUC egt9H X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Received: from [10.37.116.72] (scott4long@198.228.211.25 with xymcookie) by smtp121-mob.biz.mail.ac4.yahoo.com with SMTP; 28 Aug 2012 22:01:09 -0700 PDT References: <1F780BF4-84C3-48D5-9832-EA32381969A6@bsdimp.com> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <08166FD3-8FAD-453D-ABD3-2DC19B52FED1@yahoo.com> X-Mailer: iPhone Mail (9B206) From: Scott Long Date: Tue, 28 Aug 2012 23:01:02 -0600 To: Adrian Chadd Cc: "scottl@freebsd.org" , "freebsd-mips@freebsd.org" Subject: Re: MIPS busdma map questions X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 05:01:46 -0000 On Aug 28, 2012, at 9:43 PM, Adrian Chadd wrote: > On 28 August 2012 20:24, Warner Losh wrote: >>=20 >> On Aug 28, 2012, at 8:22 PM, Adrian Chadd wrote: >>=20 >>> Hi, >>>=20 >>> I have a couple of busdma map questions. >>>=20 >>> #1 - in mips/mips/busdma_machdep.c, bus_dmamap_destroy() calls >>> _busdma_free_dmamap() and -then- goes and walks the dma map list. Is >>> this a good idea or not? :) >>=20 >> Accessing free memory after freeing it is a free ticket to a free dose of= free pain. It should be freed after the if that checks to see if it is in u= se. >=20 > Excellent! Who knows busdma better than I and can wade through what > that code path is doing? :) >=20 >=20 >=20 There is no need to create a separate map for memory allocated via this way.= It's a convenience thing. Scott=