summaryrefslogtreecommitdiffstats
path: root/drivers/dma/idxd/idxd.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2020-01-22 00:44:17 +0100
committerVinod Koul <vkoul@kernel.org>2020-01-24 06:48:45 +0100
commitd1dfe5b8ac644a0ffccfe7af22abed7c80b34702 (patch)
treed617491597045d9cda8dad3ed4c20a2b1f53cb02 /drivers/dma/idxd/idxd.h
parentdmaengine: idxd: add sysfs ABI for idxd driver (diff)
downloadlinux-d1dfe5b8ac644a0ffccfe7af22abed7c80b34702.tar.xz
linux-d1dfe5b8ac644a0ffccfe7af22abed7c80b34702.zip
dmaengine: idxd: add descriptor manipulation routines
This commit adds helper functions for DSA descriptor allocation, submission, and free operations. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/157965025757.73301.12692876585357550065.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/idxd.h')
-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 909926aefd3e..d369b75468e3 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -68,6 +68,11 @@ enum idxd_wq_type {
#define WQ_NAME_SIZE 1024
#define WQ_TYPE_SIZE 10
+enum idxd_op_type {
+ IDXD_OP_BLOCK = 0,
+ IDXD_OP_NONBLOCK = 1,
+};
+
struct idxd_wq {
void __iomem *dportal;
struct device conf_dev;
@@ -246,4 +251,9 @@ int idxd_wq_disable(struct idxd_wq *wq);
int idxd_wq_map_portal(struct idxd_wq *wq);
void idxd_wq_unmap_portal(struct idxd_wq *wq);
+/* submission */
+int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc);
+struct idxd_desc *idxd_alloc_desc(struct idxd_wq *wq, enum idxd_op_type optype);
+void idxd_free_desc(struct idxd_wq *wq, struct idxd_desc *desc);
+
#endif