busdma sync problem
Maxime Henrion
mux at freebsd.org
Tue Jun 17 15:32:12 PDT 2003
John-Mark Gurney wrote:
> Maxime Henrion wrote this message on Tue, Jun 17, 2003 at 13:53 +0200:
> > whole map. However, I believe it would be more beneficial at this point
> > in time to try to make our busdma API as close as NetBSD's one as
> > possible. I bet we'll end up using more macros, as the NetBSD folks do
>
> Actually, right now, our bus/device interface is so far away that it'll
> take a lot of work. NetBSD shares bus_tag's between DMA and bus_space,
> so w/ FreeBSD, you already have to add a bus dma tag for each bus dmamap
> that you use in the driver. The dmamap is not an opaque type and you
> do not require callbacks to get the address for each segment.
I am well aware of how our busdma API and NetBSD's one diverge.
> Sure you can start with some small things, but I don't think these are
> a big deal, (heck it might even confuse some people), till the rest of
> the bus_dma interface has been "merged".
The current goal is to merge with NetBSD rather than diverge, so it is
meaningful to have bus_dmamap_sync() be the same, especially if you
consider that bus_dmamap_sync() is a function that we call very often in
the busdma aware drivers. Furthermore, since what we are talking about
now isn't even implemented, it doesn't cost us much to implement it the
NetBSD's way. The only drawback is that we'll have to change the
existing busdma drivers, and we don't have so many busdma drivers, plus
it's a mechanical change...
Cheers,
Maxime
More information about the freebsd-arch
mailing list