summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/registers.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2021-06-03 14:57:35 -0700
committerVinod Koul <vkoul@kernel.org>2021-07-14 12:20:56 +0530
commite753a64bee753136087dfd70b37fdd199e942ea9 (patch)
tree277d9f5bd9500c2ee8d69b417802574b366f4515 /drivers/dma/idxd/registers.h
parent0dcfe41e9a4ca759ccc87a48e3bb9cc3b08ff1e8 (diff)
dmaengine: idxd: Add wq occupancy information to sysfs attribute
Add occupancy information to wq sysfs attribute. Attribute will show wq occupancy data if "WQ Occupancy Support" field in WQCAP is 1. It displays the number of entries currently in this WQ. This is provided as an estimate and should not be relied on to determine whether there is space in the WQ. The data is to provide information to user apps for flow control. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/162275745546.1857062.8765615879420582018.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/registers.h')
-rw-r--r--drivers/dma/idxd/registers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/idxd/registers.h b/drivers/dma/idxd/registers.h
index c970c3f025f0..7343a8f48819 100644
--- a/drivers/dma/idxd/registers.h
+++ b/drivers/dma/idxd/registers.h
@@ -349,6 +349,9 @@ union wqcfg {
} __packed;
#define WQCFG_PASID_IDX 2
+#define WQCFG_OCCUP_IDX 6
+
+#define WQCFG_OCCUP_MASK 0xffff
/*
* This macro calculates the offset into the WQCFG register