summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2023-12-05 15:25:21 -0600
committerHerbert Xu <herbert@gondor.apana.org.au>2023-12-15 17:52:53 +0800
commit786d0e7f183ac1c1aef1801c2110f7582f0a6a83 (patch)
tree41b7109ce5d21f5a292ec252ab42bb55b455df7c /drivers/dma
parent86d3a34144fd634861d4401903ac9a21bb87f025 (diff)
downloadlinux-786d0e7f183ac1c1aef1801c2110f7582f0a6a83.tar.gz
linux-786d0e7f183ac1c1aef1801c2110f7582f0a6a83.tar.bz2
linux-786d0e7f183ac1c1aef1801c2110f7582f0a6a83.zip
dmaengine: idxd: Add wq private data accessors
Add the accessors idxd_wq_set_private() and idxd_wq_get_private() allowing users to set and retrieve a private void * associated with an idxd_wq. The private data is stored in the idxd_dev.conf_dev associated with each idxd_wq. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/idxd/idxd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
index ae3be5cb2ee3..4b67181f4396 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -618,6 +618,16 @@ static inline int idxd_wq_refcount(struct idxd_wq *wq)
return wq->client_count;
};
+static inline void idxd_wq_set_private(struct idxd_wq *wq, void *private)
+{
+ dev_set_drvdata(wq_confdev(wq), private);
+}
+
+static inline void *idxd_wq_get_private(struct idxd_wq *wq)
+{
+ return dev_get_drvdata(wq_confdev(wq));
+}
+
/*
* Intel IAA does not support batch processing.
* The max batch size of device, max batch size of wq and