diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2018-08-15 23:04:32 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-09-01 08:13:38 -0400 |
commit | dc9f5d0f841d604b8ca6310bd021096f804cd2a0 (patch) | |
tree | af3429b60f80d74df41b138ae5be711e4822ebcb /drivers/infiniband/hw/hfi1/file_ops.c | |
parent | a2f7bbdc2dba0e4c82a9243a64931aa81c0c28cf (diff) | |
download | linux-stable-dc9f5d0f841d604b8ca6310bd021096f804cd2a0.tar.gz linux-stable-dc9f5d0f841d604b8ca6310bd021096f804cd2a0.tar.bz2 linux-stable-dc9f5d0f841d604b8ca6310bd021096f804cd2a0.zip |
IB/hfi1: Move URGENT IRQ enable to hfi1_rcvctrl()
User contexts use the receive URGENT interrupt. However, enabling
the IRQ SRC in the file_ops module is not as clean as it could be.
Augment the _rcvctl() function to be able to enable/disable the IRQ
source.
Use the new interface from file_ops to enable/disable the IRQ.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Sadanand Warrier <sadanand.warrier@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/file_ops.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/file_ops.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index 0b669475349e..c22ebc774a6a 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b/drivers/infiniband/hw/hfi1/file_ops.c @@ -639,9 +639,6 @@ static int hfi1_file_close(struct inode *inode, struct file *fp) hfi1_cdbg(PROC, "closing ctxt %u:%u", uctxt->ctxt, fdata->subctxt); - set_intr_bits(dd, IS_RCVURGENT_START + uctxt->ctxt, - IS_RCVURGENT_START + uctxt->ctxt, false); - flush_wc(); /* drain user sdma queue */ hfi1_user_sdma_free_queues(fdata, uctxt); @@ -684,7 +681,8 @@ static int hfi1_file_close(struct inode *inode, struct file *fp) HFI1_RCVCTRL_TAILUPD_DIS | HFI1_RCVCTRL_ONE_PKT_EGR_DIS | HFI1_RCVCTRL_NO_RHQ_DROP_DIS | - HFI1_RCVCTRL_NO_EGR_DROP_DIS, uctxt); + HFI1_RCVCTRL_NO_EGR_DROP_DIS | + HFI1_RCVCTRL_URGENT_DIS, uctxt); /* Clear the context's J_KEY */ hfi1_clear_ctxt_jkey(dd, uctxt); /* @@ -1099,6 +1097,7 @@ static void user_init(struct hfi1_ctxtdata *uctxt) hfi1_set_ctxt_jkey(uctxt->dd, uctxt, uctxt->jkey); rcvctrl_ops = HFI1_RCVCTRL_CTXT_ENB; + rcvctrl_ops |= HFI1_RCVCTRL_URGENT_ENB; if (HFI1_CAP_UGET_MASK(uctxt->flags, HDRSUPP)) rcvctrl_ops |= HFI1_RCVCTRL_TIDFLOW_ENB; /* @@ -1220,10 +1219,6 @@ static int setup_base_ctxt(struct hfi1_filedata *fd, fd->uctxt = uctxt; hfi1_rcd_get(uctxt); - /* Enable the Urgent IRQ for this user context */ - set_intr_bits(dd, IS_RCVURGENT_START + uctxt->ctxt, - IS_RCVURGENT_START + uctxt->ctxt, true); - done: if (uctxt->subctxt_cnt) { /* |