[PATCH 3/3] IB: expand ib_umem_get() prototype

2008-02-05 Thread akepner
Add a new parameter, dmasync, to the ib_umem_get() prototype. Use dmasync = 1 when mapping user-allocated CQs with ib_umem_get(). Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- drivers/infiniband/core/umem.c | 17 +

[PATCH 2/3] dma/ia64: update ia64 machvecs

2008-02-05 Thread akepner
Change all ia64 machvecs to use the new dma_{un}map_*_attrs() interfaces. Implement the old dma_{un}map_*() interfaces in terms of the corresponding new interfaces. For ia64/sn, make use of one dma attribute, DMA_ATTR_SYNC_ON_WRITE. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> ---

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

2008-02-05 Thread akepner
Document the new dma_{un}map_{single|sg}_attrs() functions. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- DMA-API.txt| 65 + DMA-attributes.txt | 29 +++ 2 files changed, 94 insertions(+) diff --git

[PATCH 0/3 v2] dma: dma_{un}map_{single|sg}_attrs() interface

2008-02-05 Thread akepner
Introduce a new interface for passing architecture-specific attributes when memory is mapped and unmapped for DMA. Give the interface a default implementation which ignores attributes. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- dma-mapping.h | 35

[PATCH 0/3 v2] dma: dma_{un}map_{single|sg}_attrs() interface

2008-02-05 Thread akepner
Introduce a new interface for passing architecture-specific attributes when memory is mapped and unmapped for DMA. Give the interface a default implementation which ignores attributes. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- dma-mapping.h | 35 +++

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

2008-02-05 Thread akepner
Document the new dma_{un}map_{single|sg}_attrs() functions. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- DMA-API.txt| 65 + DMA-attributes.txt | 29 +++ 2 files changed, 94 insertions(+) diff --git

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

2008-01-31 Thread akepner
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

Re: [PATCH 4/4] IB: introducing MTHCA_MR_DMABARRIER

2008-01-31 Thread akepner
On Wed, Jan 30, 2008 at 07:00:11PM -0800, Roland Dreier wrote: > > @@ -72,6 +73,8 @@ static void __ib_umem_release(struct ib_device *dev, > struct ib_umem *umem, int d > > * @addr: userspace virtual address to start at > > * @size: length of region to pin > > * @access: IB_ACCESS_xxx

Re: [PATCH 4/4] IB: introducing MTHCA_MR_DMABARRIER

2008-01-31 Thread akepner
On Wed, Jan 30, 2008 at 07:00:11PM -0800, Roland Dreier wrote: @@ -72,6 +73,8 @@ static void __ib_umem_release(struct ib_device *dev, struct ib_umem *umem, int d * @addr: userspace virtual address to start at * @size: length of region to pin * @access: IB_ACCESS_xxx flags for

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

2008-01-31 Thread akepner
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

Re: [PATCH 2/4] dma/ia64: update ia64 machvecs

2008-01-30 Thread akepner
On Wed, Jan 30, 2008 at 11:25:58AM -0600, James Bottomley wrote: > In general, the patches look reasonable to me. Just an observation: > > On Tue, 2008-01-29 at 21:52 -0800, [EMAIL PROTECTED] wrote: > > diff --git a/include/linux/dma-attrs.h b/include/linux/dma-attrs.h > > index e69de29..31af292

[PATCH 4/4] IB: introducing MTHCA_MR_DMABARRIER

2008-01-29 Thread akepner
Add MTHCA_MR_DMABARRIER to mthca's API, increment ABI version, and make use of MTHCA_MR_DMABARRIER when mapping a user-allocated memory region with ib_umem_get(). Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- drivers/infiniband/core/umem.c | 15 +---

[PATCH 3/4] IB: add dmabarrier to ib_umem_get() prototype

2008-01-29 Thread akepner
Add a new parameter, dmabarrier, to the ib_umem_get() prototype. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- drivers/infiniband/core/umem.c |2 +- drivers/infiniband/hw/amso1100/c2_provider.c |2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c |2 +-

[PATCH 2/4] dma/ia64: update ia64 machvecs

2008-01-29 Thread akepner
Change all ia64 machvecs to use the new dma_{un}map_*_attrs() interfaces. Implement the old dma_{un}map_*() interfaces in terms of the corresponding new interfaces. For ia64/sn, make use of one dma attribute, DMA_ATTR_BARRIER. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --

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

2008-01-29 Thread akepner
Introduce a new interface for passing architecture-specific attributes when memory is mapped and unmapped for DMA. Give the interface a default implementation which ignores attributes. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- dma-mapping.h | 33

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

2008-01-29 Thread akepner
Document the new dma_{un}map_{single|sg}_attrs() functions. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- DMA-API.txt | 63 1 files changed, 63 insertions(+) diff --git a/Documentation/DMA-API.txt

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

2008-01-29 Thread akepner
Document the new dma_{un}map_{single|sg}_attrs() functions. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] -- DMA-API.txt | 63 1 files changed, 63 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt

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

2008-01-24 Thread akepner
Thanks for the review. An updated version of the patch follows. On Tue, Jan 22, 2008 at 08:59:50PM -0800, Roland Dreier wrote: > > ... > > +static inline int dma_set_attr(struct dma_attrs *attrs, unsigned attr) { > > maybe this would be cleaner if you named the DMA_ATTR enum and used > that

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

2008-01-24 Thread akepner
Thanks for the review. An updated version of the patch follows. On Tue, Jan 22, 2008 at 08:59:50PM -0800, Roland Dreier wrote: ... +static inline int dma_set_attr(struct dma_attrs *attrs, unsigned attr) { maybe this would be cleaner if you named the DMA_ATTR enum and used that

[RFC/PATCH] dma: dma_{un}map_{single|sg}_attrs() interface

2008-01-21 Thread akepner
Here's a new interface for passing attributes to the dma mapping and unmapping routines. (I have patches that make use of the interface as well, but let's discuss this piece first.) For ia64, new machvec entries replace the dma map/unmap interface, and the old interface is implemented in

[RFC/PATCH] dma: dma_{un}map_{single|sg}_attrs() interface

2008-01-21 Thread akepner
Here's a new interface for passing attributes to the dma mapping and unmapping routines. (I have patches that make use of the interface as well, but let's discuss this piece first.) For ia64, new machvec entries replace the dma map/unmap interface, and the old interface is implemented in

Re: [RFC/PARTIAL PATCH 0/3] dma: passing "attributes" to dma_map_* routines

2008-01-09 Thread akepner
On Wed, Jan 09, 2008 at 01:00:38PM -0800, Roland Dreier wrote: > . > The reason this hasn't been an issue until now is that almost all > drivers work correctly if the Altix code just sets the "flush" bit for > memory allocated via the consistent/coherent allocators. However, if > we want the

Re: [RFC/PARTIAL PATCH 0/3] dma: passing attributes to dma_map_* routines

2008-01-09 Thread akepner
On Wed, Jan 09, 2008 at 01:00:38PM -0800, Roland Dreier wrote: . The reason this hasn't been an issue until now is that almost all drivers work correctly if the Altix code just sets the flush bit for memory allocated via the consistent/coherent allocators. However, if we want the device

Re: [RFC/PARTIAL PATCH 0/3] dma: passing "attributes" to dma_map_* routines

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 12:21:44PM -0600, James Bottomley wrote: > ... > But the point is that the Altix does something non-standard but which > was later standardised (in a different way) largely so others could also > benefit from the relaxed ordering speedup. > When you say that Altix does

Re: [RFC/PARTIAL PATCH 0/3] dma: passing "attributes" to dma_map_* routines

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 05:50:54PM +, Christoph Hellwig wrote: > ... > Onething I've missed with these patches is drivers actually using > it. What driver actually needs it and why don't you send patches > for them? Some IB drivers need this. Here's an example with the ib_mthca driver. --

Re: [RFC/PARTIAL PATCH 0/3] dma: passing "attributes" to dma_map_* routines

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 10:27:08AM -0600, James Bottomley wrote: > All of the attributes I can see adding are > bus specific (even to the extent that PCIe ones wouldn't apply to PCI > for instance) > The attribute I want to pass isn't bus-specific, but architecture- specific. --

Re: [RFC/PARTIAL PATCH 1/3] dma: create linux/dma-direction.h

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 09:58:31AM +0100, Ingo Molnar wrote: > > * [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > +enum dma_data_attr { > > + DMA_ATTR_BARRIER = (1 << 0), > > + DMA_ATTR_FOO = (1 << 1), > > + DMA_ATTR_GOO = (1 << 2), > > + DMA_ATTR_MAX = (1 << 3), > > +}; > > FOO/GOO

Re: [RFC/PARTIAL PATCH 1/3] dma: create linux/dma-direction.h

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 09:58:31AM +0100, Ingo Molnar wrote: * [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: +enum dma_data_attr { + DMA_ATTR_BARRIER = (1 0), + DMA_ATTR_FOO = (1 1), + DMA_ATTR_GOO = (1 2), + DMA_ATTR_MAX = (1 3), +}; FOO/GOO we dont need i guess ...

Re: [RFC/PARTIAL PATCH 0/3] dma: passing attributes to dma_map_* routines

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 10:27:08AM -0600, James Bottomley wrote: All of the attributes I can see adding are bus specific (even to the extent that PCIe ones wouldn't apply to PCI for instance) The attribute I want to pass isn't bus-specific, but architecture- specific. -- Arthur

Re: [RFC/PARTIAL PATCH 0/3] dma: passing attributes to dma_map_* routines

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 05:50:54PM +, Christoph Hellwig wrote: ... Onething I've missed with these patches is drivers actually using it. What driver actually needs it and why don't you send patches for them? Some IB drivers need this. Here's an example with the ib_mthca driver. --

Re: [RFC/PARTIAL PATCH 0/3] dma: passing attributes to dma_map_* routines

2008-01-08 Thread akepner
On Tue, Jan 08, 2008 at 12:21:44PM -0600, James Bottomley wrote: ... But the point is that the Altix does something non-standard but which was later standardised (in a different way) largely so others could also benefit from the relaxed ordering speedup. When you say that Altix does

[RFC/PARTIAL PATCH 3/3] dma: x86_64 allow "attributes" to be used by dma_map_*

2008-01-07 Thread akepner
Allow dma "attributes" to be passed to dma_map_*/dma_unmap_* implementations on x86_64. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- arch/x86/kernel/pci-calgary_64.c | 13 - arch/x86/kernel/pci-gart_64.c| 27 +--

[RFC/PARTIAL PATCH 2/3] dma: ia64/sn2 allow "attributes" to be used by dma_map_*

2008-01-07 Thread akepner
Allow dma "attributes" to be used by dma_map_*/dma_unmap_* implementations on the ia64/sn2 architecture. (This one also includes some changes to lib/swiotlb.c which aren't specific to ia64/sn2.) Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- arch/ia64/sn/pci/pci_dma.c | 45

[RFC/PARTIAL PATCH 1/3] dma: create linux/dma-direction.h

2008-01-07 Thread akepner
Place the definition of enum dma_data_direction in its own include file, and add the definition of enum dma_data_attr and some simple routines for manipulating the direction and attributes. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- dma-direction.h | 53

[RFC/PARTIAL PATCH 0/3] dma: passing "attributes" to dma_map_* routines

2008-01-07 Thread akepner
The following patchset allows additional "attributes" to be passed to dma_map_*/dma_unmap_* implementations. (The reason why this is useful/necessary has been mentioned several times, most recently here: http://marc.info/?l=linux-kernel=119258541412724=2.) This is incomplete in that only ia64

[RFC/PARTIAL PATCH 0/3] dma: passing attributes to dma_map_* routines

2008-01-07 Thread akepner
The following patchset allows additional attributes to be passed to dma_map_*/dma_unmap_* implementations. (The reason why this is useful/necessary has been mentioned several times, most recently here: http://marc.info/?l=linux-kernelm=119258541412724w=2.) This is incomplete in that only ia64

[RFC/PARTIAL PATCH 1/3] dma: create linux/dma-direction.h

2008-01-07 Thread akepner
Place the definition of enum dma_data_direction in its own include file, and add the definition of enum dma_data_attr and some simple routines for manipulating the direction and attributes. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] -- dma-direction.h | 53

[RFC/PARTIAL PATCH 2/3] dma: ia64/sn2 allow attributes to be used by dma_map_*

2008-01-07 Thread akepner
Allow dma attributes to be used by dma_map_*/dma_unmap_* implementations on the ia64/sn2 architecture. (This one also includes some changes to lib/swiotlb.c which aren't specific to ia64/sn2.) Signed-off-by: Arthur Kepner [EMAIL PROTECTED] -- arch/ia64/sn/pci/pci_dma.c | 45

[RFC/PARTIAL PATCH 3/3] dma: x86_64 allow attributes to be used by dma_map_*

2008-01-07 Thread akepner
Allow dma attributes to be passed to dma_map_*/dma_unmap_* implementations on x86_64. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] -- arch/x86/kernel/pci-calgary_64.c | 13 - arch/x86/kernel/pci-gart_64.c| 27 +-- arch/x86/kernel/pci-nommu_64.c

Re: [RFC] dma: passing "attributes" to dma_map_* routines

2007-12-21 Thread akepner
On Fri, Dec 21, 2007 at 07:56:25AM +1100, Benjamin Herrenschmidt wrote: > ... > Can't you just have a primitive to sync things up that you call > explicitely from your driver after fetching a new status entry ? > Well, the only mechanisms I know to get things synced are the ones I mentioned

Re: [RFC] dma: passing attributes to dma_map_* routines

2007-12-21 Thread akepner
On Fri, Dec 21, 2007 at 07:56:25AM +1100, Benjamin Herrenschmidt wrote: ... Can't you just have a primitive to sync things up that you call explicitely from your driver after fetching a new status entry ? Well, the only mechanisms I know to get things synced are the ones I mentioned before:

Re: [RFC] dma: passing "attributes" to dma_map_* routines

2007-12-20 Thread akepner
On Tue, Dec 18, 2007 at 09:59:24PM +0100, Stefan Richter wrote: > > From its purpose it sounds like you need this only for few special > memory regions which would typically be mapped by dma_map_single() We need the _sg versions too, as Roland already mentioned. > and > furthermore that

Re: [RFC] dma: passing "attributes" to dma_map_* routines

2007-12-20 Thread akepner
On Tue, Dec 18, 2007 at 09:59:24PM +0100, Stefan Richter wrote: > > So that would be option 3) of yours, though without your attrs > parameter. Do you expect the need for even more flags for other kinds > of special behavior? I was hoping to keep the option of adding additional flags, but

Re: [RFC] dma: passing attributes to dma_map_* routines

2007-12-20 Thread akepner
On Tue, Dec 18, 2007 at 09:59:24PM +0100, Stefan Richter wrote: So that would be option 3) of yours, though without your attrs parameter. Do you expect the need for even more flags for other kinds of special behavior? I was hoping to keep the option of adding additional flags, but for

Re: [RFC] dma: passing attributes to dma_map_* routines

2007-12-20 Thread akepner
On Tue, Dec 18, 2007 at 09:59:24PM +0100, Stefan Richter wrote: From its purpose it sounds like you need this only for few special memory regions which would typically be mapped by dma_map_single() We need the _sg versions too, as Roland already mentioned. and furthermore that

Re: [RFC] dma: passing "attributes" to dma_map_* routines

2007-12-18 Thread akepner
On Tue, Dec 18, 2007 at 05:50:42PM +0100, Stefan Richter wrote: > Do I understand correctly?: A device and the CPUs communicate via two > separate memory areas: A data buffer and a status FIFO. The NUMA > interconnect may reorder accesses of the device to the areas. (Write > accesses? Read

Re: [RFC] dma: passing attributes to dma_map_* routines

2007-12-18 Thread akepner
On Tue, Dec 18, 2007 at 05:50:42PM +0100, Stefan Richter wrote: Do I understand correctly?: A device and the CPUs communicate via two separate memory areas: A data buffer and a status FIFO. The NUMA interconnect may reorder accesses of the device to the areas. (Write accesses? Read

[RFC] dma: passing "attributes" to dma_map_* routines

2007-12-17 Thread akepner
Waaay back in October I sent some patches for passing additional attributes to the dma_map_* routines: http://marc.info/?l=linux-kernel=119137949604365=2 This is somthing needed for ia64 Altix NUMA machines (as described in that thread). Several folks objected to the approach I used - it was

[RFC] dma: passing attributes to dma_map_* routines

2007-12-17 Thread akepner
Waaay back in October I sent some patches for passing additional attributes to the dma_map_* routines: http://marc.info/?l=linux-kernelm=119137949604365w=2 This is somthing needed for ia64 Altix NUMA machines (as described in that thread). Several folks objected to the approach I used - it

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

[PATCH 3/3] document dma_flags_set/get_*()

2007-10-16 Thread akepner
Document the dma_flags_set/get_*() interfaces. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- DMA-API.txt | 38 ++ 1 files changed, 38 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index b939ebb..00919b0 100644

[PATCH 2/3] dma: redefine dma_flags_set/get_*() for sn-ia64

2007-10-16 Thread akepner
Redefine dma_flags_set/get_*() for sn-ia64. dma_flags_set_attr() "borrows" bits from the dma_map_* routines' direction arguments (renamed "flags"). It uses the borrowed bits to pass additional attributes. dma_flags_get_dir() and dma_flags_get_attr() return the direction and attributes that

[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.

[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.

[PATCH 2/3] dma: redefine dma_flags_set/get_*() for sn-ia64

2007-10-16 Thread akepner
Redefine dma_flags_set/get_*() for sn-ia64. dma_flags_set_attr() borrows bits from the dma_map_* routines' direction arguments (renamed flags). It uses the borrowed bits to pass additional attributes. dma_flags_get_dir() and dma_flags_get_attr() return the direction and attributes that were

[PATCH 3/3] document dma_flags_set/get_*()

2007-10-16 Thread akepner
Document the dma_flags_set/get_*() interfaces. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- DMA-API.txt | 38 ++ 1 files changed, 38 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index b939ebb..00919b0 100644 ---

Re: [PATCH 4/5] infiniband: add "dmabarrier" argument to ib_umem_get()

2007-10-03 Thread akepner
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

Re: [PATCH 5/5] mthca: allow setting "dmabarrier" on user-allocated memory

2007-10-03 Thread akepner
On Wed, Oct 03, 2007 at 05:56:45AM +0300, Heikki Orsila wrote: > On Tue, Oct 02, 2007 at 07:50:07PM -0700, [EMAIL PROTECTED] wrote: > > +struct mthca_reg_mr { > > + __u32 mr_attrs; > > +#define MTHCA_MR_DMAFLUSH 0x1 /* flush in-flight DMA on a write to > > +*

Re: [PATCH 4/5] infiniband: add dmabarrier argument to ib_umem_get()

2007-10-03 Thread akepner
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

Re: [PATCH 5/5] mthca: allow setting dmabarrier on user-allocated memory

2007-10-03 Thread akepner
On Wed, Oct 03, 2007 at 05:56:45AM +0300, Heikki Orsila wrote: On Tue, Oct 02, 2007 at 07:50:07PM -0700, [EMAIL PROTECTED] wrote: +struct mthca_reg_mr { + __u32 mr_attrs; +#define MTHCA_MR_DMAFLUSH 0x1 /* flush in-flight DMA on a write to +* memory

[PATCH 5/5] mthca: allow setting "dmabarrier" on user-allocated memory

2007-10-02 Thread akepner
Allow setting a "dmabarrier" when the mthca driver registers user- allocated memory. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- mthca_provider.c |7 ++- mthca_user.h | 10 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git

[PATCH 3/5] dma: document dma_flags_set_attr()

2007-10-02 Thread akepner
Document dma_flags_set_attr(). Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- DMA-API.txt | 27 +++ 1 files changed, 27 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index cc7a8c3..16e15c0 100644 ---

[PATCH 4/5] infiniband: add "dmabarrier" argument to ib_umem_get()

2007-10-02 Thread akepner
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]> --- drivers/infiniband/core/umem.c |8 ++--

[PATCH 2/5] dma: redefine dma_flags_set_attr() for sn-ia64

2007-10-02 Thread akepner
define dma_flags_set_attr() for sn-ia64 - it "borrows" bits from the direction argument (renamed "flags") to the dma_map_* routines to pass an additional attributes. Also define routines to retrieve the original direction and attribute from "flags". Signed-off-by: Arthur Kepner <[EMAIL

[PATCH 1/5] dma: add dma_flags_set_attr() to dma interface

2007-10-02 Thread akepner
Introduce the dma_flags_set_attr() interface and give it a default no-op implementation. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- dma-mapping.h |8 1 files changed, 8 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index

[PATCH 0/5] allow drivers to flush in-flight DMA v3

2007-10-02 Thread akepner
On Altix, DMA may be reordered between a device and host memory. This reordering can happen in the NUMA interconnect, and it usually results in correct operation and improved performance. In some situations it may be necessary to explicitly synchronize DMA from the device. This patchset

Re: [PATCH 0/4] allow drivers to flush in-flight DMA v2

2007-10-02 Thread akepner
On Fri, Sep 28, 2007 at 03:43:39PM -0700, David Miller wrote: > > My only beef with this patch set is that it seems > a bit much to create a totally new function name every > time we want to set some kind of new attribute on some > DMA object. Why not add a "dma_set_flags()" or similar >

Re: [4/4] mthca: allow setting "dmabarrier" on user-allocated memory

2007-10-02 Thread akepner
On Fri, Sep 28, 2007 at 12:50:00PM -0700, Roland Dreier wrote: > Sorry for not mentioning this earlier, but this patch should really be > two (or more) patches: one to add dmabarrier support to the core user > memory stuff in drivers/infiniband, and a second one to add support to > mthca (and

Re: [4/4] mthca: allow setting dmabarrier on user-allocated memory

2007-10-02 Thread akepner
On Fri, Sep 28, 2007 at 12:50:00PM -0700, Roland Dreier wrote: Sorry for not mentioning this earlier, but this patch should really be two (or more) patches: one to add dmabarrier support to the core user memory stuff in drivers/infiniband, and a second one to add support to mthca (and more

Re: [PATCH 0/4] allow drivers to flush in-flight DMA v2

2007-10-02 Thread akepner
On Fri, Sep 28, 2007 at 03:43:39PM -0700, David Miller wrote: My only beef with this patch set is that it seems a bit much to create a totally new function name every time we want to set some kind of new attribute on some DMA object. Why not add a dma_set_flags() or similar that can be

[PATCH 0/5] allow drivers to flush in-flight DMA v3

2007-10-02 Thread akepner
On Altix, DMA may be reordered between a device and host memory. This reordering can happen in the NUMA interconnect, and it usually results in correct operation and improved performance. In some situations it may be necessary to explicitly synchronize DMA from the device. This patchset

[PATCH 1/5] dma: add dma_flags_set_attr() to dma interface

2007-10-02 Thread akepner
Introduce the dma_flags_set_attr() interface and give it a default no-op implementation. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- dma-mapping.h |8 1 files changed, 8 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index

[PATCH 2/5] dma: redefine dma_flags_set_attr() for sn-ia64

2007-10-02 Thread akepner
define dma_flags_set_attr() for sn-ia64 - it borrows bits from the direction argument (renamed flags) to the dma_map_* routines to pass an additional attributes. Also define routines to retrieve the original direction and attribute from flags. Signed-off-by: Arthur Kepner [EMAIL PROTECTED]

[PATCH 3/5] dma: document dma_flags_set_attr()

2007-10-02 Thread akepner
Document dma_flags_set_attr(). Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- DMA-API.txt | 27 +++ 1 files changed, 27 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index cc7a8c3..16e15c0 100644 --- a/Documentation/DMA-API.txt

[PATCH 4/5] infiniband: add dmabarrier argument to ib_umem_get()

2007-10-02 Thread akepner
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] --- drivers/infiniband/core/umem.c |8 ++--

[PATCH 5/5] mthca: allow setting dmabarrier on user-allocated memory

2007-10-02 Thread akepner
Allow setting a dmabarrier when the mthca driver registers user- allocated memory. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- mthca_provider.c |7 ++- mthca_user.h | 10 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git

[4/4] mthca: allow setting "dmabarrier" on user-allocated memory

2007-09-27 Thread akepner
Use the dma_flags_set_dmabarrier() interface to allow a "dmabarrier" attribute to be associated with user-allocated memory. (For now, it's only implemented for mthca.) Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- drivers/infiniband/core/umem.c |7 +--

[3/4] dma: document dma_flags_set_dmabarrier()

2007-09-27 Thread akepner
Document dma_flags_set_dmabarrier(). Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- DMA-API.txt | 26 ++ 1 files changed, 26 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index cc7a8c3..5fc0bba 100644 ---

[2/4] dma: redefine dma_flags_set_dmabarrier() for sn-ia64

2007-09-27 Thread akepner
define dma_flags_set_dmabarrier() for sn-ia64 - it "borrows" bits from the direction argument (renamed "flags") to the dma_map_* routines to pass an additional "dmabarrier" attribute. Also define routines to retrieve the original direction and attribute from "flags". Signed-off-by: Arthur Kepner

[1/4] dma: add dma_flags_set_dmabarrier() to dma interface

2007-09-27 Thread akepner
Introduce the dma_flags_set_dmabarrier() interface and give it a default no-op implementation. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> --- dma-mapping.h |6 ++ 1 files changed, 6 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index

[PATCH 0/4] allow drivers to flush in-flight DMA v2

2007-09-27 Thread akepner
On Altix, DMA may be reordered between a device and host memory. This reordering can happen in the NUMA interconnect, and it usually results in correct operation and improved performance. In some situations it may be necessary to explicitly synchronize DMA from the device. This patchset

Re: [PATCH 0/4] allow drivers to flush in-flight DMA

2007-09-27 Thread akepner
On Wed, Sep 26, 2007 at 12:49:50AM -0600, Grant Grundler wrote: [edited out several points that I think have been already addresed by others in this thread.] > > Defining it terms of completion queues won't mean much to most folks. > Better to add a description of completion queues to the

Re: [PATCH 1/4] dma: add dma_flags_set_dmaflush() to dma interface

2007-09-27 Thread akepner
On Tue, Sep 25, 2007 at 10:13:33PM -0700, Randy Dunlap wrote: > On Tue, 25 Sep 2007 17:00:57 -0700 [EMAIL PROTECTED] wrote: > .. > 1. Function signature should be on one line if possible (and it is). > Aw crud, I looked at dma-mapping.h and it uses this format sometimes. > Well, it's

Re: [PATCH 0/4] allow drivers to flush in-flight DMA

2007-09-27 Thread akepner
On Wed, Sep 26, 2007 at 12:49:50AM -0600, Grant Grundler wrote: [edited out several points that I think have been already addresed by others in this thread.] Defining it terms of completion queues won't mean much to most folks. Better to add a description of completion queues to the

[4/4] mthca: allow setting dmabarrier on user-allocated memory

2007-09-27 Thread akepner
Use the dma_flags_set_dmabarrier() interface to allow a dmabarrier attribute to be associated with user-allocated memory. (For now, it's only implemented for mthca.) Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- drivers/infiniband/core/umem.c |7 +--

[3/4] dma: document dma_flags_set_dmabarrier()

2007-09-27 Thread akepner
Document dma_flags_set_dmabarrier(). Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- DMA-API.txt | 26 ++ 1 files changed, 26 insertions(+) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index cc7a8c3..5fc0bba 100644 ---

[2/4] dma: redefine dma_flags_set_dmabarrier() for sn-ia64

2007-09-27 Thread akepner
define dma_flags_set_dmabarrier() for sn-ia64 - it borrows bits from the direction argument (renamed flags) to the dma_map_* routines to pass an additional dmabarrier attribute. Also define routines to retrieve the original direction and attribute from flags. Signed-off-by: Arthur Kepner [EMAIL

[1/4] dma: add dma_flags_set_dmabarrier() to dma interface

2007-09-27 Thread akepner
Introduce the dma_flags_set_dmabarrier() interface and give it a default no-op implementation. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] --- dma-mapping.h |6 ++ 1 files changed, 6 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index

[PATCH 0/4] allow drivers to flush in-flight DMA v2

2007-09-27 Thread akepner
On Altix, DMA may be reordered between a device and host memory. This reordering can happen in the NUMA interconnect, and it usually results in correct operation and improved performance. In some situations it may be necessary to explicitly synchronize DMA from the device. This patchset

Re: [PATCH 1/4] dma: add dma_flags_set_dmaflush() to dma interface

2007-09-27 Thread akepner
On Tue, Sep 25, 2007 at 10:13:33PM -0700, Randy Dunlap wrote: On Tue, 25 Sep 2007 17:00:57 -0700 [EMAIL PROTECTED] wrote: .. 1. Function signature should be on one line if possible (and it is). Aw crud, I looked at dma-mapping.h and it uses this format sometimes. Well, it's undesirable,

[PATCH 4/4] mthca: allow setting "dmaflush" attribute on user-allocated memory

2007-09-25 Thread akepner
Use the dma_flags_set_dmaflush() interface to allow a "dmaflush" attribute to be associated with user-allocated memory. (For now, it's only implemented for mthca.) Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- drivers/infiniband/core/umem.c |7 +--

[PATCH 2/4] dma: redefine dma_flags_set_dmaflush() for sn-ia64

2007-09-25 Thread akepner
define dma_flags_set_dmaflush() for sn-ia64 - it "borrows" bits from the direction argument (renamed "flags") to the dma_map_* routines to pass an additional "dmaflush" attribute. Also define routines to retrieve the original direction and attribute from "flags". Signed-off-by: Arthur Kepner

[PATCH 3/4] dma: document dma_flags_set_dmaflush()

2007-09-25 Thread akepner
Document dma_flags_set_dmaflush(). Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- DMA-mapping.txt | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index e07f253..31e3234 100644 ---

[PATCH 0/4] allow drivers to flush in-flight DMA

2007-09-25 Thread akepner
This is a followup to http://lkml.org/lkml/2007/8/24/280 Despite Grant's desire for a more elegant solution, there's not much new here. I moved the API change from pci.h to dma-mapping.h and removed the pci_ prefix from the name. Problem Description --- On Altix, DMA may be

[PATCH 1/4] dma: add dma_flags_set_dmaflush() to dma interface

2007-09-25 Thread akepner
Introduce the dma_flags_set_dmaflush() interface and give it a default no-op implementation. Signed-off-by: Arthur Kepner <[EMAIL PROTECTED]> -- dma-mapping.h |7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index

[PATCH 0/4] allow drivers to flush in-flight DMA

2007-09-25 Thread akepner
This is a followup to http://lkml.org/lkml/2007/8/24/280 Despite Grant's desire for a more elegant solution, there's not much new here. I moved the API change from pci.h to dma-mapping.h and removed the pci_ prefix from the name. Problem Description --- On Altix, DMA may be

[PATCH 1/4] dma: add dma_flags_set_dmaflush() to dma interface

2007-09-25 Thread akepner
Introduce the dma_flags_set_dmaflush() interface and give it a default no-op implementation. Signed-off-by: Arthur Kepner [EMAIL PROTECTED] -- dma-mapping.h |7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index

[PATCH 2/4] dma: redefine dma_flags_set_dmaflush() for sn-ia64

2007-09-25 Thread akepner
define dma_flags_set_dmaflush() for sn-ia64 - it borrows bits from the direction argument (renamed flags) to the dma_map_* routines to pass an additional dmaflush attribute. Also define routines to retrieve the original direction and attribute from flags. Signed-off-by: Arthur Kepner [EMAIL

[PATCH 3/4] dma: document dma_flags_set_dmaflush()

2007-09-25 Thread akepner
Document dma_flags_set_dmaflush(). Signed-off-by: Arthur Kepner [EMAIL PROTECTED] -- DMA-mapping.txt | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index e07f253..31e3234 100644 ---

  1   2   >