Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0394808d authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

Merge branch 'mr_fix' into git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma for-next

Update mlx4 to support user MR creation against read-only memory, previously
it required the memory to be writable.

Based on rdma for-rc due to dependencies.

* mr_fix: (2 commits)
  IB/mlx4: Mark user MR as writable if actual virtual memory is writable
  IB/core: Make testing MR flags for writability a static inline function
parents bb42f87e d8f9cc32
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -5391,7 +5391,6 @@ S: Maintained
F:	drivers/iommu/exynos-iommu.c

EZchip NPS platform support
M:	Elad Kanfi <eladkan@mellanox.com>
M:	Vineet Gupta <vgupta@synopsys.com>
S:	Supported
F:	arch/arc/plat-eznps
@@ -9012,7 +9011,6 @@ Q: http://patchwork.ozlabs.org/project/netdev/list/
F:	drivers/net/ethernet/mellanox/mlx5/core/en_*

MELLANOX ETHERNET INNOVA DRIVER
M:	Ilan Tayari <ilant@mellanox.com>
R:	Boris Pismenny <borisp@mellanox.com>
L:	netdev@vger.kernel.org
S:	Supported
@@ -9022,7 +9020,6 @@ F: drivers/net/ethernet/mellanox/mlx5/core/fpga/*
F:	include/linux/mlx5/mlx5_ifc_fpga.h

MELLANOX ETHERNET INNOVA IPSEC DRIVER
M:	Ilan Tayari <ilant@mellanox.com>
R:	Boris Pismenny <borisp@mellanox.com>
L:	netdev@vger.kernel.org
S:	Supported
@@ -9078,7 +9075,6 @@ F: include/uapi/rdma/mlx4-abi.h

MELLANOX MLX5 core VPI driver
M:	Saeed Mahameed <saeedm@mellanox.com>
M:	Matan Barak <matanb@mellanox.com>
M:	Leon Romanovsky <leonro@mellanox.com>
L:	netdev@vger.kernel.org
L:	linux-rdma@vger.kernel.org
@@ -9089,7 +9085,6 @@ F: drivers/net/ethernet/mellanox/mlx5/core/
F:	include/linux/mlx5/

MELLANOX MLX5 IB driver
M:	Matan Barak <matanb@mellanox.com>
M:	Leon Romanovsky <leonro@mellanox.com>
L:	linux-rdma@vger.kernel.org
W:	http://www.mellanox.com
@@ -9821,7 +9816,6 @@ F: net/netfilter/xt_CONNSECMARK.c
F:	net/netfilter/xt_SECMARK.c

NETWORKING [TLS]
M:	Ilya Lesokhin <ilyal@mellanox.com>
M:	Aviad Yehezkel <aviadye@mellanox.com>
M:	Dave Watson <davejwatson@fb.com>
L:	netdev@vger.kernel.org
+2 −16
Original line number Diff line number Diff line
@@ -117,20 +117,9 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
	umem->length     = size;
	umem->address    = addr;
	umem->page_shift = PAGE_SHIFT;
	umem->pid	 = get_task_pid(current, PIDTYPE_PID);
	/*
	 * We ask for writable memory if any of the following
	 * access flags are set.  "Local write" and "remote write"
	 * obviously require write access.  "Remote atomic" can do
	 * things like fetch and add, which will modify memory, and
	 * "MW bind" can change permissions by binding a window.
	 */
	umem->writable  = !!(access &
		(IB_ACCESS_LOCAL_WRITE   | IB_ACCESS_REMOTE_WRITE |
		 IB_ACCESS_REMOTE_ATOMIC | IB_ACCESS_MW_BIND));
	umem->writable   = ib_access_writable(access);

	if (access & IB_ACCESS_ON_DEMAND) {
		put_pid(umem->pid);
		ret = ib_umem_odp_get(context, umem, access);
		if (ret) {
			kfree(umem);
@@ -146,7 +135,6 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,

	page_list = (struct page **) __get_free_page(GFP_KERNEL);
	if (!page_list) {
		put_pid(umem->pid);
		kfree(umem);
		return ERR_PTR(-ENOMEM);
	}
@@ -229,7 +217,6 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
	if (ret < 0) {
		if (need_release)
			__ib_umem_release(context->device, umem, 0);
		put_pid(umem->pid);
		kfree(umem);
	} else
		current->mm->pinned_vm = locked;
@@ -272,8 +259,7 @@ void ib_umem_release(struct ib_umem *umem)

	__ib_umem_release(umem->context->device, umem, 1);

	task = get_pid_task(umem->pid, PIDTYPE_PID);
	put_pid(umem->pid);
	task = get_pid_task(umem->context->tgid, PIDTYPE_PID);
	if (!task)
		goto out;
	mm = get_task_mm(task);
+2 −2
Original line number Diff line number Diff line
@@ -489,10 +489,10 @@ struct ib_mr *c4iw_get_dma_mr(struct ib_pd *pd, int acc)
err_dereg_mem:
	dereg_mem(&rhp->rdev, mhp->attr.stag, mhp->attr.pbl_size,
		  mhp->attr.pbl_addr, mhp->dereg_skb, mhp->wr_waitp);
err_free_wr_wait:
	c4iw_put_wr_wait(mhp->wr_waitp);
err_free_skb:
	kfree_skb(mhp->dereg_skb);
err_free_wr_wait:
	c4iw_put_wr_wait(mhp->wr_waitp);
err_free_mhp:
	kfree(mhp);
	return ERR_PTR(ret);
+4 −0
Original line number Diff line number Diff line
@@ -5945,6 +5945,7 @@ static void is_sendctxt_err_int(struct hfi1_devdata *dd,
	u64 status;
	u32 sw_index;
	int i = 0;
	unsigned long irq_flags;

	sw_index = dd->hw_to_sw[hw_context];
	if (sw_index >= dd->num_send_contexts) {
@@ -5954,10 +5955,12 @@ static void is_sendctxt_err_int(struct hfi1_devdata *dd,
		return;
	}
	sci = &dd->send_contexts[sw_index];
	spin_lock_irqsave(&dd->sc_lock, irq_flags);
	sc = sci->sc;
	if (!sc) {
		dd_dev_err(dd, "%s: context %u(%u): no sc?\n", __func__,
			   sw_index, hw_context);
		spin_unlock_irqrestore(&dd->sc_lock, irq_flags);
		return;
	}

@@ -5979,6 +5982,7 @@ static void is_sendctxt_err_int(struct hfi1_devdata *dd,
	 */
	if (sc->type != SC_USER)
		queue_work(dd->pport->hfi1_wq, &sc->halt_work);
	spin_unlock_irqrestore(&dd->sc_lock, irq_flags);

	/*
	 * Update the counters for the corresponding status bits.
+1 −0
Original line number Diff line number Diff line
@@ -377,6 +377,7 @@ struct ib_cq *hns_roce_ib_create_cq(struct ib_device *ib_dev,

			hr_cq->set_ci_db = hr_cq->db.db_record;
			*hr_cq->set_ci_db = 0;
			hr_cq->db_en = 1;
		}

		/* Init mmt table and write buff address to mtt table */
Loading