aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/cxl/debugfs.c')
-rw-r--r--drivers/misc/cxl/debugfs.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
index eae9d749f967..1643850d2302 100644
--- a/drivers/misc/cxl/debugfs.c
+++ b/drivers/misc/cxl/debugfs.c
@@ -15,28 +15,6 @@
15 15
16static struct dentry *cxl_debugfs; 16static struct dentry *cxl_debugfs;
17 17
18void cxl_stop_trace_psl9(struct cxl *adapter)
19{
20 /* Stop the trace */
21 cxl_p1_write(adapter, CXL_PSL9_TRACECFG, 0x4480000000000000ULL);
22}
23
24void cxl_stop_trace_psl8(struct cxl *adapter)
25{
26 int slice;
27
28 /* Stop the trace */
29 cxl_p1_write(adapter, CXL_PSL_TRACE, 0x8000000000000017LL);
30
31 /* Stop the slice traces */
32 spin_lock(&adapter->afu_list_lock);
33 for (slice = 0; slice < adapter->slices; slice++) {
34 if (adapter->afu[slice])
35 cxl_p1n_write(adapter->afu[slice], CXL_PSL_SLICE_TRACE, 0x8000000000000000LL);
36 }
37 spin_unlock(&adapter->afu_list_lock);
38}
39
40/* Helpers to export CXL mmaped IO registers via debugfs */ 18/* Helpers to export CXL mmaped IO registers via debugfs */
41static int debugfs_io_u64_get(void *data, u64 *val) 19static int debugfs_io_u64_get(void *data, u64 *val)
42{ 20{
@@ -62,9 +40,14 @@ static struct dentry *debugfs_create_io_x64(const char *name, umode_t mode,
62void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir) 40void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir)
63{ 41{
64 debugfs_create_io_x64("fir1", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR1)); 42 debugfs_create_io_x64("fir1", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR1));
65 debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR2)); 43 debugfs_create_io_x64("fir_mask", 0400, dir,
44 _cxl_p1_addr(adapter, CXL_PSL9_FIR_MASK));
66 debugfs_create_io_x64("fir_cntl", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR_CNTL)); 45 debugfs_create_io_x64("fir_cntl", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR_CNTL));
67 debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_TRACECFG)); 46 debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_TRACECFG));
47 debugfs_create_io_x64("debug", 0600, dir,
48 _cxl_p1_addr(adapter, CXL_PSL9_DEBUG));
49 debugfs_create_io_x64("xsl-debug", 0600, dir,
50 _cxl_p1_addr(adapter, CXL_XSL9_DBG));
68} 51}
69 52
70void cxl_debugfs_add_adapter_regs_psl8(struct cxl *adapter, struct dentry *dir) 53void cxl_debugfs_add_adapter_regs_psl8(struct cxl *adapter, struct dentry *dir)