diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2018-08-16 09:04:22 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-09-01 15:13:38 +0300 |
commit | a2f7bbdc2dba0e4c82a9243a64931aa81c0c28cf (patch) | |
tree | 7971c809605dd7e66a63845158da97377ec1f23b /drivers/infiniband/hw/hfi1/msix.c | |
parent | e63bb50d1994b71f97b40077ddec46a7354197a0 (diff) | |
download | linux-a2f7bbdc2dba0e4c82a9243a64931aa81c0c28cf.tar.xz |
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/msix.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/msix.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/msix.c b/drivers/infiniband/hw/hfi1/msix.c index 72cd0269cb2e..d920b165d696 100644 --- a/drivers/infiniband/hw/hfi1/msix.c +++ b/drivers/infiniband/hw/hfi1/msix.c @@ -241,6 +241,21 @@ int msix_request_sdma_irq(struct sdma_engine *sde) } /** + * enable_sdma_src() - Helper to enable SDMA IRQ srcs + * @dd: valid devdata structure + * @i: index of SDMA engine + */ +static void enable_sdma_srcs(struct hfi1_devdata *dd, int i) +{ + set_intr_bits(dd, IS_SDMA_START + i, IS_SDMA_START + i, true); + set_intr_bits(dd, IS_SDMA_PROGRESS_START + i, + IS_SDMA_PROGRESS_START + i, true); + set_intr_bits(dd, IS_SDMA_IDLE_START + i, IS_SDMA_IDLE_START + i, true); + set_intr_bits(dd, IS_SDMAENG_ERR_START + i, IS_SDMAENG_ERR_START + i, + true); +} + +/** * msix_request_irqs() - Allocate all MSIx IRQs * @dd: valid devdata structure * @@ -262,6 +277,7 @@ int msix_request_irqs(struct hfi1_devdata *dd) ret = msix_request_sdma_irq(sde); if (ret) return ret; + enable_sdma_srcs(sde->dd, i); } for (i = 0; i < dd->n_krcv_queues; i++) { |