diff options
author | Dave Jiang <dave.jiang@intel.com> | 2021-10-26 14:36:10 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-11-22 11:21:26 +0530 |
commit | 8b67426e05584e956775f4b134596b56bc0d35e0 (patch) | |
tree | 6277368110ff1dfc2ee2d80edaf659e1d8859962 /drivers/dma/idxd/device.c | |
parent | 5d78abb6fbc974d601dd365b9ce39f320fb5ba79 (diff) | |
download | lwn-8b67426e05584e956775f4b134596b56bc0d35e0.tar.gz lwn-8b67426e05584e956775f4b134596b56bc0d35e0.zip |
dmaengine: idxd: int handle management refactoring
Attach int_handle to irq_entry. This removes the separate management of int
handles and reduces the confusion of interating through int handles that is
off by 1 count.
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163528417065.3925689.11505755433684476288.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/device.c')
-rw-r--r-- | drivers/dma/idxd/device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index fab412349f7f..f381319615fd 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -1206,6 +1206,13 @@ int __drv_enable_wq(struct idxd_wq *wq) goto err; } + /* + * Device has 1 misc interrupt and N interrupts for descriptor completion. To + * assign WQ to interrupt, we will take the N+1 interrupt since vector 0 is + * for the misc interrupt. + */ + wq->ie = &idxd->irq_entries[wq->id + 1]; + rc = idxd_wq_enable(wq); if (rc < 0) { dev_dbg(dev, "wq %d enabling failed: %d\n", wq->id, rc); @@ -1256,6 +1263,7 @@ void __drv_disable_wq(struct idxd_wq *wq) idxd_wq_drain(wq); idxd_wq_reset(wq); + wq->ie = NULL; wq->client_count = 0; } |