summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1/file_ops.c
diff options
context:
space:
mode:
authorMichael J. Ruhl <michael.j.ruhl@intel.com>2018-08-15 23:04:22 -0700
committerDoug Ledford <dledford@redhat.com>2018-09-01 08:13:38 -0400
commita2f7bbdc2dba0e4c82a9243a64931aa81c0c28cf (patch)
tree7971c809605dd7e66a63845158da97377ec1f23b /drivers/infiniband/hw/hfi1/file_ops.c
parente63bb50d1994b71f97b40077ddec46a7354197a0 (diff)
IB/hfi1: Rework the IRQ API to be more flexible
The current IRQ API is an all or nothing interface. This has two problems: 1. All IRQs are enabled regardless of use 2. Moving from general interrupt to MSIx handling is difficult Introduce a new API to enable/disable specific IRQs or a range of IRQs. Do not enable and disable all IRQs in one step. Rework various modules to enable/disable IRQs when needed. 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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c
index 1fc75647e47b..0b669475349e 100644
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@ -639,6 +639,9 @@ 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);
@@ -1217,6 +1220,10 @@ 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) {
/*