Re: [PATCH 1/4] dma: document dma_{un}map_{single|sg}_attrs() interface

From: akepner
Date: Thu Jan 31 2008 - 22:09:29 EST


On Thu, Jan 31, 2008 at 03:38:48PM -0700, Grant Grundler wrote:

Thanks for looking through this.

I'll send an updated patchset that addresses your comments
as soon as I can - probably around Monday.

> ...
> > +struct dma_attrs encapsulates a set of "dma attributes". For the
> > +definition of struct dma_attrs see linux/dma-attrs.h.
>
> Because all architectures will share the set of attrs definitions,
> would it be reasonable to document the intent of each attr?
>
> Two reasons for doing this:
> 1) people reading the driver code should understand WHY the dma attr was added.
> 2) other arch maintainers need to know in order to implement the same attr
> for their shiny new toys.
>
>
> > +The interpretation of dma attributes is architecture-specific.
>
> This statement is really important....but:
> Could we add a reference to arch documentation for each attr?
>
> ie something public (doesn't have to be in linux source tree)
> which explains the subtlies of how that DMA attr actually works.
>
> Having worked on HP chipsets for 10+ years, I know releasing
> original HW docs is often not possible. I'm not asking for the
> impossible. Please don't flame me for that. But if the company
> is willing to publish the existance of a feature, a paragraph or
> two would be good marketing too. Maybe just include comments in
> the arch/ code that implements the feature and reference those
> comments in DMA-API.txt.
> ....

OK, I can certainly add an explanation of the attribute that
I'm worried about.

I think there's a reference to this behavior in our driver
porting guide - I can add a pointer to that, too.

This might also address your point above about documenting
each attribute - let me know once the next patch is out.

--
Arthur

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/