From: James Clark <james.clark@linaro.org>
To: Jie Gan <quic_jiegan@quicinc.com>
Cc: Tingwei Zhang <quic_tingweiz@quicinc.com>,
Jinlong Mao <quic_jinlmao@quicinc.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Subject: Re: [PATCH v12 3/7] Coresight: Use coresight_etm_get_trace_id() in traceid_show()
Date: Tue, 18 Feb 2025 10:03:28 +0000 [thread overview]
Message-ID: <9adf9f13-128d-4ef0-ae31-4db4d295e2fe@linaro.org> (raw)
In-Reply-To: <20250217093024.1133096-4-quic_jiegan@quicinc.com>
On 17/02/2025 9:30 am, Jie Gan wrote:
> From: James Clark <james.clark@linaro.org>
>
> Use the new API, coresight_etm_get_trace_id, to read the traceid of the ETM
> device when call traceid_show via sysfs node.
>
> Signed-off-by: James Clark <james.clark@linaro.org>
> Signed-off-by: Jie Gan <quic_jiegan@quicinc.com>
> ---
> drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 3 +--
> drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 4 ++--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> index 68c644be9813..b9006451f515 100644
> --- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> @@ -1190,10 +1190,9 @@ static DEVICE_ATTR_RO(cpu);
> static ssize_t traceid_show(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> - int trace_id;
> struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent);
> + int trace_id = coresight_etm_get_trace_id(drvdata->csdev, CS_MODE_SYSFS, NULL);
>
> - trace_id = etm_read_alloc_trace_id(drvdata);
> if (trace_id < 0)
> return trace_id;
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> index c767f8ae4cf1..e5216c0f60da 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> @@ -4,6 +4,7 @@
> * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
> */
>
> +#include <linux/coresight.h>
> #include <linux/pid_namespace.h>
> #include <linux/pm_runtime.h>
> #include <linux/sysfs.h>
> @@ -2402,10 +2403,9 @@ static ssize_t trctraceid_show(struct device *dev,
> struct device_attribute *attr,
> char *buf)
> {
> - int trace_id;
> struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent);
> + int trace_id = coresight_etm_get_trace_id(drvdata->csdev, CS_MODE_SYSFS, NULL);
>
> - trace_id = etm4_read_alloc_trace_id(drvdata);
> if (trace_id < 0)
> return trace_id;
>
Reviewed-by: James Clark <james.clark@linaro.org>
next prev parent reply other threads:[~2025-02-18 10:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 9:30 [PATCH v12 0/7] Coresight: Add Coresight TMC Control Unit driver Jie Gan
2025-02-17 9:30 ` [PATCH v12 1/7] Coresight: Add support for new APB clock name Jie Gan
2025-02-17 9:30 ` [PATCH v12 2/7] Coresight: Add trace_id function to retrieving the trace ID Jie Gan
2025-02-20 17:34 ` Suzuki K Poulose
2025-02-21 1:23 ` Jie Gan
2025-02-17 9:30 ` [PATCH v12 3/7] Coresight: Use coresight_etm_get_trace_id() in traceid_show() Jie Gan
2025-02-18 10:03 ` James Clark [this message]
2025-02-17 9:30 ` [PATCH v12 4/7] Coresight: Introduce a new struct coresight_path Jie Gan
2025-02-21 10:30 ` Suzuki K Poulose
2025-02-24 2:35 ` Jie Gan
2025-02-17 9:30 ` [PATCH v12 5/7] dt-bindings: arm: Add Coresight TMC Control Unit hardware Jie Gan
2025-02-17 9:30 ` [PATCH v12 6/7] Coresight: Add Coresight TMC Control Unit driver Jie Gan
2025-02-21 11:39 ` Suzuki K Poulose
2025-02-24 3:32 ` Jie Gan
2025-02-24 9:53 ` James Clark
2025-02-24 10:04 ` Jie Gan
2025-02-24 10:33 ` Jie Gan
2025-02-24 10:22 ` Suzuki K Poulose
2025-02-24 10:26 ` Jie Gan
2025-02-17 9:30 ` [PATCH v12 7/7] arm64: dts: qcom: sa8775p: Add CTCU and ETR nodes Jie Gan
2025-02-18 10:05 ` [PATCH v12 0/7] Coresight: Add Coresight TMC Control Unit driver James Clark
2025-02-19 0:59 ` Jie Gan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9adf9f13-128d-4ef0-ae31-4db4d295e2fe@linaro.org \
--to=james.clark@linaro.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mike.leach@linaro.org \
--cc=quic_jiegan@quicinc.com \
--cc=quic_jinlmao@quicinc.com \
--cc=quic_tingweiz@quicinc.com \
--cc=robh@kernel.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox