Re: [RFC/PATCH] allow memory to be tagged "coherent" via dma_map_sg()

From: akepner
Date: Tue Jul 17 2007 - 11:23:24 EST


On Tue, Jul 17, 2007 at 01:16:58PM +0300, Muli Ben-Yehuda wrote:
> On Mon, Jul 16, 2007 at 07:18:12PM -0700, akepner@xxxxxxx wrote:
> .....
> > --- a/include/linux/dma-mapping.h
> > +++ b/include/linux/dma-mapping.h
> > @@ -95,4 +95,11 @@ static inline void dmam_release_declared_memory(struct device *dev)
> > }
> > #endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
> >
> > +#ifndef ARCH_DOES_POSTED_DMA
> > +static inline int
> > +dma_data_direction_set_dmaflush(enum dma_data_direction dir, int dmaflush) {
> > + return (dir);
> > +}
> > +#endif /* ARCH_DOES_POSTED_DMA */
> > +
> > #endif
>
> The generic bits look much better than the previous version,
> thanks. Is the generic dma_data_direction_set_dmaflush really needed?

Yes, dma_data_direction_set_dmaflush is used in ib_umem_get() to pass
the additional bit down to sn_dma_map_sg().

> if yes, what about dma_data_direction_get_direction and
> dma_data_direction_get_dmaflush?
>

The dma_data_direction_get_* functions are used only in sn2-arch-
specific code (sn_dma_map_sg()), so they don't need to be defined
for other architectures.

--
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/