Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2012 23:01:02 -0600
From:      Scott Long <scott4long@yahoo.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "scottl@freebsd.org" <scottl@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: MIPS busdma map questions
Message-ID:  <08166FD3-8FAD-453D-ABD3-2DC19B52FED1@yahoo.com>
In-Reply-To: <CAJ-VmokHX7=Jd06tJWmAJfTGtuF4WfgpgGb0f0PwUzfP-QpJ0Q@mail.gmail.com>
References:  <CAJ-VmomuwKKaQ6AszeDo-iQwL%2B8DPJpBB9av0K%2BVbaj2feHO7g@mail.gmail.com> <1F780BF4-84C3-48D5-9832-EA32381969A6@bsdimp.com> <CAJ-VmokHX7=Jd06tJWmAJfTGtuF4WfgpgGb0f0PwUzfP-QpJ0Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Aug 28, 2012, at 9:43 PM, Adrian Chadd <adrian@freebsd.org> wrote:

> On 28 August 2012 20:24, Warner Losh <imp@bsdimp.com> 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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08166FD3-8FAD-453D-ABD3-2DC19B52FED1>