* [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers
@ 2017-09-20 6:23 Vaibhav Jain
2017-09-20 8:51 ` Andrew Donnellan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vaibhav Jain @ 2017-09-20 6:23 UTC (permalink / raw)
To: linuxppc-dev, Frederic Barrat, Christophe Lombard
Cc: Vaibhav Jain, Andrew Donnellan, Philippe Bergheaud, Alastair D'Silva
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>
---
drivers/misc/cxl/cxl.h | 1 +
drivers/misc/cxl/debugfs.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
index b1afeccbb97f..2c10b536427a 100644
--- a/drivers/misc/cxl/cxl.h
+++ b/drivers/misc/cxl/cxl.h
@@ -100,6 +100,7 @@ static const cxl_p1_reg_t CXL_XSL_FEC = {0x0158};
static const cxl_p1_reg_t CXL_XSL_DSNCTL = {0x0168};
/* PSL registers - CAIA 2 */
static const cxl_p1_reg_t CXL_PSL9_CONTROL = {0x0020};
+static const cxl_p1_reg_t CXL_XSL9_DBG = {0x0130};
static const cxl_p1_reg_t CXL_XSL9_DSNCTL = {0x0168};
static const cxl_p1_reg_t CXL_PSL9_FIR1 = {0x0300};
static const cxl_p1_reg_t CXL_PSL9_FIR2 = {0x0308};
diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
index eae9d749f967..10ff569c1272 100644
--- a/drivers/misc/cxl/debugfs.c
+++ b/drivers/misc/cxl/debugfs.c
@@ -65,6 +65,10 @@ void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir)
debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR2));
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)
--
2.13.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers
2017-09-20 6:23 [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers Vaibhav Jain
@ 2017-09-20 8:51 ` Andrew Donnellan
2017-10-09 9:25 ` Frederic Barrat
2017-10-24 8:08 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2017-09-20 8:51 UTC (permalink / raw)
To: Vaibhav Jain, linuxppc-dev, Frederic Barrat, Christophe Lombard
Cc: Philippe Bergheaud, Alastair D'Silva
On 20/09/17 16:23, Vaibhav Jain wrote:
> 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>
> ---
> drivers/misc/cxl/cxl.h | 1 +
> drivers/misc/cxl/debugfs.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
> index b1afeccbb97f..2c10b536427a 100644
> --- a/drivers/misc/cxl/cxl.h
> +++ b/drivers/misc/cxl/cxl.h
> @@ -100,6 +100,7 @@ static const cxl_p1_reg_t CXL_XSL_FEC = {0x0158};
> static const cxl_p1_reg_t CXL_XSL_DSNCTL = {0x0168};
> /* PSL registers - CAIA 2 */
> static const cxl_p1_reg_t CXL_PSL9_CONTROL = {0x0020};
> +static const cxl_p1_reg_t CXL_XSL9_DBG = {0x0130};
> static const cxl_p1_reg_t CXL_XSL9_DSNCTL = {0x0168};
> static const cxl_p1_reg_t CXL_PSL9_FIR1 = {0x0300};
> static const cxl_p1_reg_t CXL_PSL9_FIR2 = {0x0308};
> diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
> index eae9d749f967..10ff569c1272 100644
> --- a/drivers/misc/cxl/debugfs.c
> +++ b/drivers/misc/cxl/debugfs.c
> @@ -65,6 +65,10 @@ void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir)
> debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR2));
> 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)
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers
2017-09-20 6:23 [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers Vaibhav Jain
2017-09-20 8:51 ` Andrew Donnellan
@ 2017-10-09 9:25 ` Frederic Barrat
2017-10-24 8:08 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Frederic Barrat @ 2017-10-09 9:25 UTC (permalink / raw)
To: Vaibhav Jain, linuxppc-dev, Christophe Lombard
Cc: Philippe Bergheaud, Andrew Donnellan, Alastair D'Silva
Le 20/09/2017 à 08:23, Vaibhav Jain a écrit :
> 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>
> ---
Thanks!
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
> drivers/misc/cxl/cxl.h | 1 +
> drivers/misc/cxl/debugfs.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
> index b1afeccbb97f..2c10b536427a 100644
> --- a/drivers/misc/cxl/cxl.h
> +++ b/drivers/misc/cxl/cxl.h
> @@ -100,6 +100,7 @@ static const cxl_p1_reg_t CXL_XSL_FEC = {0x0158};
> static const cxl_p1_reg_t CXL_XSL_DSNCTL = {0x0168};
> /* PSL registers - CAIA 2 */
> static const cxl_p1_reg_t CXL_PSL9_CONTROL = {0x0020};
> +static const cxl_p1_reg_t CXL_XSL9_DBG = {0x0130};
> static const cxl_p1_reg_t CXL_XSL9_DSNCTL = {0x0168};
> static const cxl_p1_reg_t CXL_PSL9_FIR1 = {0x0300};
> static const cxl_p1_reg_t CXL_PSL9_FIR2 = {0x0308};
> diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
> index eae9d749f967..10ff569c1272 100644
> --- a/drivers/misc/cxl/debugfs.c
> +++ b/drivers/misc/cxl/debugfs.c
> @@ -65,6 +65,10 @@ void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir)
> debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR2));
> 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)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers
2017-09-20 6:23 [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers Vaibhav Jain
2017-09-20 8:51 ` Andrew Donnellan
2017-10-09 9:25 ` Frederic Barrat
@ 2017-10-24 8:08 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-10-24 8:08 UTC (permalink / raw)
To: Vaibhav Jain, linuxppc-dev, Frederic Barrat, Christophe Lombard
Cc: Philippe Bergheaud, Vaibhav Jain, Andrew Donnellan, Alastair D'Silva
On Wed, 2017-09-20 at 06:23:22 UTC, Vaibhav Jain wrote:
> 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>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/1cafc629408d1883a00c9f656e3de5
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-24 8:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 6:23 [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers Vaibhav Jain
2017-09-20 8:51 ` Andrew Donnellan
2017-10-09 9:25 ` Frederic Barrat
2017-10-24 8:08 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).