diff options
author | Dave Jiang <dave.jiang@intel.com> | 2021-10-27 00:36:29 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-11-22 08:51:26 +0300 |
commit | bd5970a0d01f8e45af9b2e2cf1d245b84ea757ba (patch) | |
tree | 4912b0ed32cd6d6b537667c13c8f255cdbdd6a8e /drivers/dma/idxd/dma.c | |
parent | 46c6df1c958e55558212cfa94cad201eae48d684 (diff) | |
download | linux-bd5970a0d01f8e45af9b2e2cf1d245b84ea757ba.tar.xz |
dmaengine: idxd: create locked version of idxd_quiesce() call
Add a locked version of idxd_quiesce() call so that the quiesce can be
called with a lock in situations where the lock is not held by the caller.
In the driver probe/remove path, the lock is already held, so the raw
version can be called w/o locking.
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163528418980.3925689.5841907054957931211.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/dma.c')
-rw-r--r-- | drivers/dma/idxd/dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c index 1ea663215909..375dbae18583 100644 --- a/drivers/dma/idxd/dma.c +++ b/drivers/dma/idxd/dma.c @@ -316,7 +316,7 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev) return 0; err_dma: - idxd_wq_quiesce(wq); + __idxd_wq_quiesce(wq); percpu_ref_exit(&wq->wq_active); err_ref: idxd_wq_free_resources(wq); @@ -333,7 +333,7 @@ static void idxd_dmaengine_drv_remove(struct idxd_dev *idxd_dev) struct idxd_wq *wq = idxd_dev_to_wq(idxd_dev); mutex_lock(&wq->wq_lock); - idxd_wq_quiesce(wq); + __idxd_wq_quiesce(wq); idxd_unregister_dma_channel(wq); idxd_wq_free_resources(wq); __drv_disable_wq(wq); |