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