[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071003175112.GP26752@sgi.com>
Date: Wed, 3 Oct 2007 10:51:12 -0700
From: akepner@....com
To: David Miller <davem@...emloft.net>
Cc: grundler@...isc-linux.org, jbarnes@...tuousgeek.org, jes@....com,
randy.dunlap@...cle.com, rdreier@...co.com,
James.Bottomley@...eleye.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] infiniband: add "dmabarrier" argument to ib_umem_get()
On Tue, Oct 02, 2007 at 08:10:23PM -0700, David Miller wrote:
> From: akepner@....com
> 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 <akepner@....com>
>
> Acked-by: David S. Miller <davem@...emloft.net>
>
> 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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists