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>
This commit is contained in:
parent
a2f7bbdc2d
commit
dc9f5d0f84
@ -11951,6 +11951,13 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op,
|
||||
rcvctrl |= RCV_CTXT_CTRL_DONT_DROP_EGR_FULL_SMASK;
|
||||
if (op & HFI1_RCVCTRL_NO_EGR_DROP_DIS)
|
||||
rcvctrl &= ~RCV_CTXT_CTRL_DONT_DROP_EGR_FULL_SMASK;
|
||||
if (op & HFI1_RCVCTRL_URGENT_ENB)
|
||||
set_intr_bits(dd, IS_RCVURGENT_START + rcd->ctxt,
|
||||
IS_RCVURGENT_START + rcd->ctxt, true);
|
||||
if (op & HFI1_RCVCTRL_URGENT_DIS)
|
||||
set_intr_bits(dd, IS_RCVURGENT_START + rcd->ctxt,
|
||||
IS_RCVURGENT_START + rcd->ctxt, false);
|
||||
|
||||
hfi1_cdbg(RCVCTRL, "ctxt %d rcvctrl 0x%llx\n", ctxt, rcvctrl);
|
||||
write_kctxt_csr(dd, ctxt, RCV_CTXT_CTRL, rcvctrl);
|
||||
|
||||
|
@ -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) {
|
||||
/*
|
||||
|
@ -621,6 +621,8 @@ struct rvt_sge_state;
|
||||
#define HFI1_RCVCTRL_NO_RHQ_DROP_DIS 0x8000
|
||||
#define HFI1_RCVCTRL_NO_EGR_DROP_ENB 0x10000
|
||||
#define HFI1_RCVCTRL_NO_EGR_DROP_DIS 0x20000
|
||||
#define HFI1_RCVCTRL_URGENT_ENB 0x40000
|
||||
#define HFI1_RCVCTRL_URGENT_DIS 0x80000
|
||||
|
||||
/* partition enforcement flags */
|
||||
#define HFI1_PART_ENFORCE_IN 0x1
|
||||
|
Loading…
Reference in New Issue
Block a user