Re: [PATCH 1/3] dma: add dma_flags_set/get_*() interfaces

2007-10-17 Thread Andrew Morton
On Wed, 17 Oct 2007 09:03:27 -0700 [EMAIL PROTECTED] wrote: > > > > What would be the cost of doing this cleanly and either redefining > > dma_data_direction to be a field-of-bits or just leave dma_data_direction > > alone (it is quite unrelated to this work, isn't it?) and adding new > > fields/

Re: [PATCH 1/3] dma: add dma_flags_set/get_*() interfaces

2007-10-17 Thread akepner
[reply to the series of three mails below] On Tue, Oct 16, 2007 at 08:27:28PM -0700, Andrew Morton wrote: > On Tue, 16 Oct 2007 18:41:28 -0700 [EMAIL PROTECTED] wrote: > > > +#define DMA_BARRIER_ATTR 0x1 > > +#ifndef ARCH_USES_DMA_ATTRS > > +static inline int dma_flags_set_attr(u32 attr, enum

Re: [PATCH 1/3] dma: add dma_flags_set/get_*() interfaces

2007-10-16 Thread Andrew Morton
On Tue, 16 Oct 2007 18:41:28 -0700 [EMAIL PROTECTED] wrote: > +#define DMA_BARRIER_ATTR 0x1 > +#ifndef ARCH_USES_DMA_ATTRS > +static inline int dma_flags_set_attr(u32 attr, enum dma_data_direction dir) > +{ > + return dir; > +} This function takes an `enum dma_data_direction' as its seco

[PATCH 1/3] dma: add dma_flags_set/get_*() interfaces

2007-10-16 Thread akepner
Introduce the dma_flags_set/get_*() interfaces and give them default implementations. Architectures which allow DMA to be reordered between a device and host memory (within a NUMA interconnect) can redefine these to allow a driver to explicitly synchronize DMA from the device when necessary.