diff options
author | Arthur Kepner <akepner@sgi.com> | 2008-04-29 04:00:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:12 -0400 |
commit | cb9fbc5c37b69ac584e61d449cfd590f5ae1f90d (patch) | |
tree | 3079752ba33535a21db08bed1390aca9136fadfe /include/rdma/ib_verbs.h | |
parent | 309df0c503c35fbb5a09537fcbb1f4967b9ca489 (diff) |
IB: expand ib_umem_get() prototype
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 <akepner@sgi.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jes Sorensen <jes@sgi.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r-- | include/rdma/ib_verbs.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 2dcbecce3f61..911a661b7278 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1542,6 +1542,24 @@ static inline void ib_dma_unmap_single(struct ib_device *dev, | |||
1542 | dma_unmap_single(dev->dma_device, addr, size, direction); | 1542 | dma_unmap_single(dev->dma_device, addr, size, direction); |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | static inline u64 ib_dma_map_single_attrs(struct ib_device *dev, | ||
1546 | void *cpu_addr, size_t size, | ||
1547 | enum dma_data_direction direction, | ||
1548 | struct dma_attrs *attrs) | ||
1549 | { | ||
1550 | return dma_map_single_attrs(dev->dma_device, cpu_addr, size, | ||
1551 | direction, attrs); | ||
1552 | } | ||
1553 | |||
1554 | static inline void ib_dma_unmap_single_attrs(struct ib_device *dev, | ||
1555 | u64 addr, size_t size, | ||
1556 | enum dma_data_direction direction, | ||
1557 | struct dma_attrs *attrs) | ||
1558 | { | ||
1559 | return dma_unmap_single_attrs(dev->dma_device, addr, size, | ||
1560 | direction, attrs); | ||
1561 | } | ||
1562 | |||
1545 | /** | 1563 | /** |
1546 | * ib_dma_map_page - Map a physical page to DMA address | 1564 | * ib_dma_map_page - Map a physical page to DMA address |
1547 | * @dev: The device for which the dma_addr is to be created | 1565 | * @dev: The device for which the dma_addr is to be created |
@@ -1611,6 +1629,21 @@ static inline void ib_dma_unmap_sg(struct ib_device *dev, | |||
1611 | dma_unmap_sg(dev->dma_device, sg, nents, direction); | 1629 | dma_unmap_sg(dev->dma_device, sg, nents, direction); |
1612 | } | 1630 | } |
1613 | 1631 | ||
1632 | static inline int ib_dma_map_sg_attrs(struct ib_device *dev, | ||
1633 | struct scatterlist *sg, int nents, | ||
1634 | enum dma_data_direction direction, | ||
1635 | struct dma_attrs *attrs) | ||
1636 | { | ||
1637 | return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, attrs); | ||
1638 | } | ||
1639 | |||
1640 | static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, | ||
1641 | struct scatterlist *sg, int nents, | ||
1642 | enum dma_data_direction direction, | ||
1643 | struct dma_attrs *attrs) | ||
1644 | { | ||
1645 | dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, attrs); | ||
1646 | } | ||
1614 | /** | 1647 | /** |
1615 | * ib_sg_dma_address - Return the DMA address from a scatter/gather entry | 1648 | * ib_sg_dma_address - Return the DMA address from a scatter/gather entry |
1616 | * @dev: The device for which the DMA addresses were created | 1649 | * @dev: The device for which the DMA addresses were created |