summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/device.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2020-01-21 16:44:29 -0700
committerVinod Koul <vkoul@kernel.org>2020-01-24 11:18:45 +0530
commit42d279f9137ab7d5503836baec2739284b278d8f (patch)
treed2876eeee15f34802ffe1d20f5ff0a331ba08d48 /drivers/dma/idxd/device.c
parent8f47d1a5e545f903cd049c42da31a3be36178447 (diff)
dmaengine: idxd: add char driver to expose submission portal to userland
Create a char device region that will allow acquisition of user portals in order to allow applications to submit DMA operations. A char device will be created per work queue that gets exposed. The workqueue type "user" is used to mark a work queue for user char device. For example if the workqueue 0 of DSA device 0 is marked for char device, then a device node of /dev/dsa/wq0.0 will be created. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/157965026985.73301.976523230037106742.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index b4c4cec489df..ada69e722f84 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -539,7 +539,7 @@ static int idxd_wq_config_write(struct idxd_wq *wq)
wq->wqcfg.wq_thresh = wq->threshold;
/* byte 8-11 */
- wq->wqcfg.priv = 1; /* kernel, therefore priv */
+ wq->wqcfg.priv = !!(wq->type == IDXD_WQT_KERNEL);
wq->wqcfg.mode = 1;
wq->wqcfg.priority = wq->priority;