On Tue, Oct 02, 2007 at 08:10:23PM -0700, David Miller wrote: > From: [EMAIL PROTECTED] > Date: Tue, 2 Oct 2007 19:49:06 -0700 > > > > > Pass a "dmabarrier" argument to ib_umem_get() and use the new > > argument to control setting the DMA_BARRIER_ATTR attribute on > > the memory that ib_umem_get() maps for DMA. > > > > Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> > > Acked-by: David S. Miller <[EMAIL PROTECTED]> > > However I'm a little unhappy with how IA64 achieves this. > > The last argument for dma_map_foo() is an enum not an int, > every platform other than IA64 properly defines the last > argument as "enum dma_data_direction". It can take one > of several distinct values, it is not a mask. > > This hijacking of the DMA direction argument is hokey at > best, and at worst is type bypassing which is going to > explode subtly for someone in the future and result in > a long painful debugging session. > ....
I don't dispute your point about abusing the enum here, it just seemed the least objectionable, and most expedient way to go. But I'll add that ia64 isn't alone, x86_64 also uses an int for the final argument to its dma_map_* implementations. -- Arthur - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/