diff options
author | Dave Jiang <dave.jiang@intel.com> | 2021-06-04 00:57:35 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-07-14 09:50:56 +0300 |
commit | e753a64bee753136087dfd70b37fdd199e942ea9 (patch) | |
tree | 277d9f5bd9500c2ee8d69b417802574b366f4515 /drivers/dma/idxd/registers.h | |
parent | 0dcfe41e9a4ca759ccc87a48e3bb9cc3b08ff1e8 (diff) | |
download | linux-e753a64bee753136087dfd70b37fdd199e942ea9.tar.xz |
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.h | 3 |
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 |