diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-07-29 13:33:38 -0300 |
---|---|---|
committer | Leon Romanovsky <leonro@nvidia.com> | 2022-08-16 15:08:31 +0300 |
commit | 19d6214ad6dfffda1a5bdc2b34ea75ba45a1a60a (patch) | |
tree | 9f73d5ac61cb0d97dd2c502e1c53e56631eab606 | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) |
IB/mlx5: Call io_stop_wc() after writing to WC MMIO
This new function is defined only on ARM and serves to guarantee a barrier
in the WC operation. The barrier means that another run of this loop will
not combine with the stores this loop created.
On x86 this is happening implicitly because of the spin_unlock().
Link: https://lore.kernel.org/r/0-v1-c5dade92f363+11-mlx5_io_stop_wc_jgg@nvidia.com
Suggested-by: Pavel Shamis <Pavel.Shamis@arm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
-rw-r--r-- | drivers/infiniband/hw/mlx5/mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/mem.c b/drivers/infiniband/hw/mlx5/mem.c index 6191aa833ac2..6b29e9ca323e 100644 --- a/drivers/infiniband/hw/mlx5/mem.c +++ b/drivers/infiniband/hw/mlx5/mem.c @@ -152,6 +152,7 @@ static int post_send_nop(struct mlx5_ib_dev *dev, struct ib_qp *ibqp, u64 wr_id, for (i = 0; i < 8; i++) mlx5_write64(&mmio_wqe[i * 2], bf->bfreg->map + bf->offset + i * 8); + io_stop_wc(); bf->offset ^= bf->buf_size; |