diff options
author | Jason Gunthorpe | 2018-05-28 19:44:35 +0200 |
---|---|---|
committer | Jason Gunthorpe | 2018-05-28 19:44:35 +0200 |
commit | 0394808d9ed5ca9d3595ca4d97ce79faf845ac77 (patch) | |
tree | fd183abcc31abe5baeaaabf0b00e2671e4b11ad9 /drivers/infiniband/hw/hfi1 | |
parent | IB/rxe: avoid unnecessary export (diff) | |
parent | IB/mlx4: Mark user MR as writable if actual virtual memory is writable (diff) | |
download | kernel-qcow2-linux-0394808d9ed5ca9d3595ca4d97ce79faf845ac77.tar.gz kernel-qcow2-linux-0394808d9ed5ca9d3595ca4d97ce79faf845ac77.tar.xz kernel-qcow2-linux-0394808d9ed5ca9d3595ca4d97ce79faf845ac77.zip |
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
Diffstat (limited to 'drivers/infiniband/hw/hfi1')
-rw-r--r-- | drivers/infiniband/hw/hfi1/chip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c index 46e9e4ffcba4..68580cb2ae1e 100644 --- a/drivers/infiniband/hw/hfi1/chip.c +++ b/drivers/infiniband/hw/hfi1/chip.c @@ -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. |