summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/idxd.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2023-04-07 13:31:32 -0700
committerVinod Koul <vkoul@kernel.org>2023-04-12 23:18:45 +0530
commit5fbe6503b52f5665560584f62adab5db70ac910e (patch)
tree054494a2e43f38cc8021cf701164bcb42940648f /drivers/dma/idxd/idxd.h
parent2f431ba908d2ef05da478d10925207728f1ff483 (diff)
downloadlwn-5fbe6503b52f5665560584f62adab5db70ac910e.tar.gz
lwn-5fbe6503b52f5665560584f62adab5db70ac910e.zip
dmanegine: idxd: add debugfs for event log dump
Add debugfs entry to dump the content of the event log for debugging. The function will dump all non-zero entries in the event log. It will note which entries are processed and which entries are still pending processing at the time of the dump. The entries may not always be in chronological order due to the log is a circular buffer. Tested-by: Tony Zhu <tony.zhu@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Co-developed-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Link: https://lore.kernel.org/r/20230407203143.2189681-6-fenghua.yu@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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
index c74681f02b18..b923b90b7299 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -330,6 +330,9 @@ struct idxd_device {
unsigned long *opcap_bmap;
struct idxd_evl *evl;
+
+ struct dentry *dbgfs_dir;
+ struct dentry *dbgfs_evl_file;
};
static inline unsigned int evl_ent_size(struct idxd_device *idxd)
@@ -704,4 +707,10 @@ static inline void perfmon_init(void) {}
static inline void perfmon_exit(void) {}
#endif
+/* debugfs */
+int idxd_device_init_debugfs(struct idxd_device *idxd);
+void idxd_device_remove_debugfs(struct idxd_device *idxd);
+int idxd_init_debugfs(void);
+void idxd_remove_debugfs(void);
+
#endif