aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/debugfs.c
diff options
context:
space:
mode:
authorVaibhav Jain <vaibhav@linux.vnet.ibm.com>2017-09-20 11:53:22 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2017-10-22 12:08:31 +0200
commit1cafc629408d1883a00c9f656e3de5a677460a88 (patch)
tree6b0b46213bed60730618c259c101013a9964f4d2 /drivers/misc/cxl/debugfs.c
parentpowerpc/tm: P9 disable transactionally suspended sigcontexts (diff)
downloadlinux-dev-1cafc629408d1883a00c9f656e3de5a677460a88.tar.xz
linux-dev-1cafc629408d1883a00c9f656e3de5a677460a88.zip
cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers
Access to PSL/XSL_DEBUG registers on the adapter provides easy access to the debug facilities provided by PSL/XSL. So this patch adds two new files (debug, xsl-debug) to the cxl-adapter specific debugfs folder located at /sys/kernel/debugfs/cxl/card<n>, which will provide direct r/w access to corrosponding debug registers in the adapter config-space. Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/debugfs.c')
-rw-r--r--drivers/misc/cxl/debugfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
index 52e3d97db114..dbb9b58077f6 100644
--- a/drivers/misc/cxl/debugfs.c
+++ b/drivers/misc/cxl/debugfs.c
@@ -66,6 +66,10 @@ void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir)
_cxl_p1_addr(adapter, CXL_PSL9_FIR_MASK));
debugfs_create_io_x64("fir_cntl", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR_CNTL));
debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_TRACECFG));
+ debugfs_create_io_x64("debug", 0600, dir,
+ _cxl_p1_addr(adapter, CXL_PSL9_DEBUG));
+ debugfs_create_io_x64("xsl-debug", 0600, dir,
+ _cxl_p1_addr(adapter, CXL_XSL9_DBG));
}
void cxl_debugfs_add_adapter_regs_psl8(struct cxl *adapter, struct dentry *dir)