From: Jinlong Mao <quic_jinlmao@quicinc.com>
To: James Clark <james.clark@arm.com>
Cc: <linux-kernel@vger.kernel.org>, <coresight@lists.linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
Yuanfang Zhang <quic_yuanfang@quicinc.com>,
"Tao Zhang" <quic_taozha@quicinc.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andy Gross <agross@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v1 1/2] coresight: Add remote etm support
Date: Thu, 9 Nov 2023 14:19:47 +0800 [thread overview]
Message-ID: <d59bd2c4-5730-a4c4-7b82-07ce564ae84c@quicinc.com> (raw)
In-Reply-To: <d396d9ba-9574-8f11-8bbb-d1fd939421c5@arm.com>
On 11/8/2023 7:19 PM, James Clark wrote:
>
> On 07/11/2023 06:09, Mao Jinlong wrote:
>> Add support for ETM trace collection on remote processor using
>> coreSight framework.
>>
>> Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
>> ---
>> drivers/hwtracing/coresight/Kconfig | 9 +
>> drivers/hwtracing/coresight/Makefile | 1 +
>> drivers/hwtracing/coresight/coresight-core.c | 3 +
>> drivers/hwtracing/coresight/coresight-qmi.h | 109 ++++++
>> .../coresight/coresight-remote-etm.c | 325 ++++++++++++++++++
>> include/linux/coresight.h | 1 +
>> 6 files changed, 448 insertions(+)
>> create mode 100644 drivers/hwtracing/coresight/coresight-qmi.h
>> create mode 100644 drivers/hwtracing/coresight/coresight-remote-etm.c
>>
>> diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig
>> index 06f0a7594169..425886ab7401 100644
>> --- a/drivers/hwtracing/coresight/Kconfig
>> +++ b/drivers/hwtracing/coresight/Kconfig
>> @@ -247,4 +247,13 @@ config CORESIGHT_DUMMY
>>
>> To compile this driver as a module, choose M here: the module will be
>> called coresight-dummy.
>> +
>> +config CORESIGHT_REMOTE_ETM
>> + tristate "Remote processor ETM trace support"
>> + select QCOM_QMI_HELPERS
>> + help
>> + Enables support for ETM trace collection on remote processor using
>> + CoreSight framework. Enabling this will allow turning on ETM
>> + tracing on remote processor via sysfs by configuring the required
>> + CoreSight components.
>> endif
>> diff --git a/drivers/hwtracing/coresight/Makefile b/drivers/hwtracing/coresight/Makefile
>> index 995d3b2c76df..a5283cab0bc0 100644
>> --- a/drivers/hwtracing/coresight/Makefile
>> +++ b/drivers/hwtracing/coresight/Makefile
>> @@ -29,5 +29,6 @@ obj-$(CONFIG_CORESIGHT_TPDM) += coresight-tpdm.o
>> obj-$(CONFIG_CORESIGHT_TPDA) += coresight-tpda.o
>> coresight-cti-y := coresight-cti-core.o coresight-cti-platform.o \
>> coresight-cti-sysfs.o
>> +obj-$(CONFIG_CORESIGHT_REMOTE_ETM) += coresight-remote-etm.o
>> obj-$(CONFIG_ULTRASOC_SMB) += ultrasoc-smb.o
>> obj-$(CONFIG_CORESIGHT_DUMMY) += coresight-dummy.o
>> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
>> index d7f0e231feb9..f365a3899821 100644
>> --- a/drivers/hwtracing/coresight/coresight-core.c
>> +++ b/drivers/hwtracing/coresight/coresight-core.c
>> @@ -1094,6 +1094,7 @@ static int coresight_validate_source(struct coresight_device *csdev,
>> if (subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_PROC &&
>> subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE &&
>> subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM &&
>> + subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_REMOTE_PROC &&
......
> +{
> + return platform_driver_register(&remote_etm_driver);
> +}
> +module_init(remote_etm_init);
> +
> +void __exit remote_etm_exit(void)
> +{
> + platform_driver_unregister(&remote_etm_driver);
> +}
> +module_exit(remote_etm_exit);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_DESCRIPTION("CoreSight Remote ETM driver");
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index a4cb7dd6ca23..f0a947a61680 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -65,6 +65,7 @@ enum coresight_dev_subtype_source {
> CORESIGHT_DEV_SUBTYPE_SOURCE_BUS,
> CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE,
> CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM,
> + CORESIGHT_DEV_SUBTYPE_SOURCE_REMOTE_PROC,
> CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS,
> };
>
Thanks for the review. I will check the comments and address your
comments in next version.
Thanks
Jinlong Mao
next prev parent reply other threads:[~2023-11-09 6:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 6:09 [PATCH v1 0/2] " Mao Jinlong
2023-11-07 6:09 ` [PATCH v1 1/2] " Mao Jinlong
2023-11-07 15:26 ` Krzysztof Kozlowski
2023-11-09 6:17 ` Jinlong Mao
2023-11-08 2:34 ` kernel test robot
2023-11-08 11:19 ` James Clark
2023-11-09 6:19 ` Jinlong Mao [this message]
2023-11-07 6:09 ` [PATCH v1 2/2] dt-bindings: arm: Add remote etm driver Mao Jinlong
2023-11-07 15:30 ` Krzysztof Kozlowski
2023-11-07 15:31 ` Krzysztof Kozlowski
2023-11-16 17:22 ` Krzysztof Kozlowski
2023-11-20 22:39 ` Trilok Soni
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=d59bd2c4-5730-a4c4-7b82-07ce564ae84c@quicinc.com \
--to=quic_jinlmao@quicinc.com \
--cc=agross@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=james.clark@arm.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=quic_taozha@quicinc.com \
--cc=quic_yuanfang@quicinc.com \
--cc=robh+dt@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
all inboxes | Powered by JetHome®