aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/device.c
diff options
context:
space:
mode:
authorGravatar Dave Jiang <dave.jiang@intel.com> 2020-11-13 15:55:05 -0700
committerGravatar Vinod Koul <vkoul@kernel.org> 2020-12-10 12:56:44 +0530
commit92de5fa2dc39c3fba0704f7ac914e7f02eb732f2 (patch)
treeb867127de4232b0d82716fd3ba773f794d8abc7e /drivers/dma/idxd/device.c
parentdmaengine: ti: drop of_match_ptr and mark of_device_id table as maybe unused (diff)
downloadlinux-92de5fa2dc39c3fba0704f7ac914e7f02eb732f2.tar.gz
linux-92de5fa2dc39c3fba0704f7ac914e7f02eb732f2.tar.bz2
linux-92de5fa2dc39c3fba0704f7ac914e7f02eb732f2.zip
dmaengine: idxd: add ATS disable knob for work queues
With the DSA spec 1.1 update, a knob to disable ATS for individually is introduced. Add enabling code to allow a system admin to make the configuration through sysfs. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/160530810593.1288392.2561048329116529566.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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index d6f551dcbcb6..b75f9a09666e 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -354,6 +354,7 @@ void idxd_wq_disable_cleanup(struct idxd_wq *wq)
wq->group = NULL;
wq->threshold = 0;
wq->priority = 0;
+ wq->ats_dis = 0;
clear_bit(WQ_FLAG_DEDICATED, &wq->flags);
memset(wq->name, 0, WQ_NAME_SIZE);
@@ -631,6 +632,9 @@ static int idxd_wq_config_write(struct idxd_wq *wq)
test_bit(WQ_FLAG_BLOCK_ON_FAULT, &wq->flags))
wq->wqcfg->bof = 1;
+ if (idxd->hw.wq_cap.wq_ats_support)
+ wq->wqcfg->wq_ats_disable = wq->ats_dis;
+
/* bytes 12-15 */
wq->wqcfg->max_xfer_shift = ilog2(wq->max_xfer_bytes);
wq->wqcfg->max_batch_shift = ilog2(wq->max_batch_size);