Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/mlx5: Rename mlx5_mr_cache_invalidate() to revoke_mr()

Now that this is only used in a few places in mr.c give it a sensible
name. It has nothing to do with the cache and can be invoked on any
MR. DMA is stopped and the user cannot touch the MR any further once it
completes.

Link: https://lore.kernel.org/r/20210304120745.1090751-5-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

+6 -6
+6 -6
drivers/infiniband/hw/mlx5/mr.c
··· 1640 1640 } 1641 1641 1642 1642 /** 1643 - * mlx5_mr_cache_invalidate - Fence all DMA on the MR 1643 + * revoke_mr - Fence all DMA on the MR 1644 1644 * @mr: The MR to fence 1645 1645 * 1646 1646 * Upon return the NIC will not be doing any DMA to the pages under the MR, 1647 - * and any DMA inprogress will be completed. Failure of this function 1647 + * and any DMA in progress will be completed. Failure of this function 1648 1648 * indicates the HW has failed catastrophically. 1649 1649 */ 1650 - static int mlx5_mr_cache_invalidate(struct mlx5_ib_mr *mr) 1650 + static int revoke_mr(struct mlx5_ib_mr *mr) 1651 1651 { 1652 1652 struct mlx5_umr_wr umrwr = {}; 1653 1653 ··· 1741 1741 * with it. This ensure the change is atomic relative to any use of the 1742 1742 * MR. 1743 1743 */ 1744 - err = mlx5_mr_cache_invalidate(mr); 1744 + err = revoke_mr(mr); 1745 1745 if (err) 1746 1746 return err; 1747 1747 ··· 1820 1820 * Only one active MR can refer to a umem at one time, revoke 1821 1821 * the old MR before assigning the umem to the new one. 1822 1822 */ 1823 - err = mlx5_mr_cache_invalidate(mr); 1823 + err = revoke_mr(mr); 1824 1824 if (err) 1825 1825 return ERR_PTR(err); 1826 1826 umem = mr->umem; ··· 1965 1965 1966 1966 /* Stop DMA */ 1967 1967 if (mr->cache_ent) { 1968 - if (mlx5_mr_cache_invalidate(mr)) { 1968 + if (revoke_mr(mr)) { 1969 1969 spin_lock_irq(&mr->cache_ent->lock); 1970 1970 mr->cache_ent->total_mrs--; 1971 1971 spin_unlock_irq(&mr->cache_ent->lock);