diff mbox series

[v4,18/25] coresight: etm4x: Expose trcdevarch via trcidr

Message ID 20201119164547.2982871-19-suzuki.poulose@arm.com (mailing list archive)
State New, archived
Headers show
Series coresight: etm4x: Support for system instructions | expand

Commit Message

Suzuki K Poulose Nov. 19, 2020, 4:45 p.m. UTC
Expose the TRCDEVARCH register via the sysfs for component
detection. Given that the TRCIDR1 may not completely identify
the ETM component and instead need to use TRCDEVARCH, expose
this via sysfs for tools to use it for identification.

Cc: Mike Leach <mike.leach@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mathieu Poirier Nov. 30, 2020, 10:42 p.m. UTC | #1
On Thu, Nov 19, 2020 at 04:45:40PM +0000, Suzuki K Poulose wrote:
> Expose the TRCDEVARCH register via the sysfs for component
> detection. Given that the TRCIDR1 may not completely identify
> the ETM component and instead need to use TRCDEVARCH, expose
> this via sysfs for tools to use it for identification.
> 
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> index 009818675928..277fd5bff811 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> @@ -2395,6 +2395,7 @@ coresight_etm4x_cross_read(trcidr10, TRCIDR10);
>  coresight_etm4x_cross_read(trcidr11, TRCIDR11);
>  coresight_etm4x_cross_read(trcidr12, TRCIDR12);
>  coresight_etm4x_cross_read(trcidr13, TRCIDR13);
> +coresight_etm4x_cross_read(trcdevarch, TRCDEVARCH);
>  
>  static struct attribute *coresight_etmv4_trcidr_attrs[] = {
>  	&dev_attr_trcidr0.attr,
> @@ -2410,6 +2411,7 @@ static struct attribute *coresight_etmv4_trcidr_attrs[] = {
>  	&dev_attr_trcidr11.attr,
>  	&dev_attr_trcidr12.attr,
>  	&dev_attr_trcidr13.attr,
> +	&dev_attr_trcdevarch.attr,
>  	NULL,
>  };
>  
> -- 
> 2.24.1
>
diff mbox series

Patch

diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
index 009818675928..277fd5bff811 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
@@ -2395,6 +2395,7 @@  coresight_etm4x_cross_read(trcidr10, TRCIDR10);
 coresight_etm4x_cross_read(trcidr11, TRCIDR11);
 coresight_etm4x_cross_read(trcidr12, TRCIDR12);
 coresight_etm4x_cross_read(trcidr13, TRCIDR13);
+coresight_etm4x_cross_read(trcdevarch, TRCDEVARCH);
 
 static struct attribute *coresight_etmv4_trcidr_attrs[] = {
 	&dev_attr_trcidr0.attr,
@@ -2410,6 +2411,7 @@  static struct attribute *coresight_etmv4_trcidr_attrs[] = {
 	&dev_attr_trcidr11.attr,
 	&dev_attr_trcidr12.attr,
 	&dev_attr_trcidr13.attr,
+	&dev_attr_trcdevarch.attr,
 	NULL,
 };