From: Jinlong Mao <quic_jinlmao@quicinc.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Konrad Dybcio <konradybcio@gmail.com>,
Mike Leach <mike.leach@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<coresight@lists.linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Tingwei Zhang <quic_tingweiz@quicinc.com>,
Yuanfang Zhang <quic_yuanfang@quicinc.com>,
Tao Zhang <quic_taozha@quicinc.com>,
Trilok Soni <quic_tsoni@quicinc.com>,
Hao Zhang <quic_hazha@quicinc.com>,
<linux-arm-msm@vger.kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH v7 02/10] Coresight: Add coresight TPDM source driver
Date: Wed, 1 Jun 2022 17:56:53 +0800 [thread overview]
Message-ID: <2da46bcb-c1e4-dbde-c4ee-1d6983565dc9@quicinc.com> (raw)
In-Reply-To: <006b7edd-20d2-3165-7c83-352b7fb312e7@arm.com>
On 6/1/2022 5:30 PM, Suzuki K Poulose wrote:
> On 01/06/2022 10:21, Jinlong Mao wrote:
>> Hi Suzuki,
>>
>> On 5/24/2022 3:00 PM, Jinlong Mao wrote:
>>> Hi Suzuki,
>>>
>>> Thank you for the review.
>>>
>>> On 5/23/2022 4:57 PM, Suzuki K Poulose wrote:
>>>> Hi
>>>>
>>>> On 09/05/2022 14:39, Mao Jinlong wrote:
>>>>> Add driver to support Coresight device TPDM (Trace, Profiling and
>>>>> Diagnostics Monitor). TPDM is a monitor to collect data from
>>>>> different datasets. This change is to add probe/enable/disable
>>>>> functions for tpdm source.
>>>>>
>>>>> Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
>>>>> Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
>>>>> ---
>>>>> drivers/hwtracing/coresight/Kconfig | 13 ++
>>>>> drivers/hwtracing/coresight/Makefile | 1 +
>>>>> drivers/hwtracing/coresight/coresight-core.c | 5 +-
>>>>> drivers/hwtracing/coresight/coresight-tpdm.c | 146
>>>>> +++++++++++++++++++
>>>>> drivers/hwtracing/coresight/coresight-tpdm.h | 26 ++++
>>>>> include/linux/coresight.h | 1 +
>>>>> 6 files changed, 191 insertions(+), 1 deletion(-)
>>>>> create mode 100644 drivers/hwtracing/coresight/coresight-tpdm.c
>>>>> create mode 100644 drivers/hwtracing/coresight/coresight-tpdm.h
>>>>>
>>
>>>>> +/**
>>>>> + * struct tpdm_drvdata - specifics associated to an TPDM component
>>>>> + * @base: memory mapped base address for this component.
>>>>> + * @dev: The device entity associated to this component.
>>>>> + * @csdev: component vitals needed by the framework.
>>>>> + * @lock: lock for the enable value.
>>>>> + * @enable: enable status of the component.
>>>>> + */
>>>>> +
>>>>> +struct tpdm_drvdata {
>>>>> + void __iomem *base;
>>>>> + struct device *dev;
>>>>> + struct coresight_device *csdev;
>>>>> + struct mutex lock;
>>>>
>>>> Why mutex lock ? Couldn't this be a spinlock ?
>>> 1. There is no irq for TPDM
>>> 2. As there are 7 dataset types, there will be some FOR loop to
>>> configure
>>> tpdm registers which may cause some time.
>
> How long does it take to configure ? Is it too long enough to trigger
> RCU stalls ? as long as we don't do any sleeping/blocking operations
> we should be fine with a spinlock.
>
> Suzuki
Let me check on internal device and get back to you.
Thanks
Jinlong Mao
>
>>>
>> I think we can use mutex lock here. Do you have any more comments for
>> this ?
>
>>
>> Thanks
>> Jinlong Mao
>>>>
>>>>> + bool enable;
>>>>> +};
>>>>> +
>>>>> +#endif /* _CORESIGHT_CORESIGHT_TPDM_H */
>>>>> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
>>>>> index 247147c11231..a9efac55029d 100644
>>>>> --- a/include/linux/coresight.h
>>>>> +++ b/include/linux/coresight.h
>>>>> @@ -61,6 +61,7 @@ enum coresight_dev_subtype_source {
>>>>> CORESIGHT_DEV_SUBTYPE_SOURCE_PROC,
>>>>> CORESIGHT_DEV_SUBTYPE_SOURCE_BUS,
>>>>> CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE,
>>>>> + CORESIGHT_DEV_SUBTYPE_SOURCE_DATA_ONLY,
>>>>
>>>> super minor nit: I find the choice of name a bit odd.
>>>> We could simply make it something like :
>>>>
>>>> CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS:
>>>>
>>>> Suzuki
>>> I will check and update.
>>>>
>>>>> };
>>>>> enum coresight_dev_subtype_helper {
>>>>
>>>> _______________________________________________
>>>> CoreSight mailing list -- coresight@lists.linaro.org
>>>> To unsubscribe send an email to coresight-leave@lists.linaro.org
>>> _______________________________________________
>>> CoreSight mailing list -- coresight@lists.linaro.org
>>> To unsubscribe send an email to coresight-leave@lists.linaro.org
>
> _______________________________________________
> CoreSight mailing list -- coresight@lists.linaro.org
> To unsubscribe send an email to coresight-leave@lists.linaro.org
next prev parent reply other threads:[~2022-06-01 9:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 13:39 [PATCH v7 00/10] Coresight: Add support for TPDM and TPDA Mao Jinlong
2022-05-09 13:39 ` [PATCH v7 01/10] coresight: core: Use IDR for non-cpu bound sources' paths Mao Jinlong
2022-05-09 13:39 ` [PATCH v7 02/10] Coresight: Add coresight TPDM source driver Mao Jinlong
2022-05-23 8:57 ` Suzuki K Poulose
2022-05-24 7:00 ` Jinlong Mao
2022-06-01 9:21 ` Jinlong Mao
2022-06-01 9:30 ` Suzuki K Poulose
2022-06-01 9:56 ` Jinlong Mao [this message]
2022-06-02 3:14 ` Jinlong Mao
2022-05-09 13:39 ` [PATCH v7 03/10] dt-bindings: arm: Adds CoreSight TPDM hardware definitions Mao Jinlong
2022-05-23 9:02 ` Suzuki K Poulose
2022-05-09 13:39 ` [PATCH v7 04/10] coresight-tpdm: Add DSB dataset support Mao Jinlong
2022-05-23 9:11 ` Suzuki K Poulose
2022-05-23 9:24 ` Suzuki K Poulose
2022-05-24 7:15 ` Jinlong Mao
2022-05-24 7:07 ` Jinlong Mao
2022-05-09 13:39 ` [PATCH v7 05/10] coresight-tpdm: Add integration test support Mao Jinlong
2022-05-23 9:17 ` Suzuki K Poulose
2022-05-24 7:14 ` Jinlong Mao
2022-05-09 13:39 ` [PATCH v7 06/10] docs: sysfs: coresight: Add sysfs ABI documentation for TPDM Mao Jinlong
2022-05-09 13:39 ` [PATCH v7 07/10] Coresight: Add TPDA link driver Mao Jinlong
2022-05-23 9:40 ` Suzuki K Poulose
2022-05-24 7:32 ` Jinlong Mao
2022-05-09 13:39 ` [PATCH v7 08/10] dt-bindings: arm: Adds CoreSight TPDA hardware definitions Mao Jinlong
2022-05-23 9:44 ` Suzuki K Poulose
2022-05-23 14:24 ` Rob Herring
2022-05-24 7:34 ` Jinlong Mao
2022-05-09 13:39 ` [PATCH v7 09/10] arm64: dts: qcom: sm8250: Add coresight components Mao Jinlong
2022-05-09 13:39 ` [PATCH v7 10/10] arm64: dts: qcom: sm8250: Add tpdm mm/prng Mao Jinlong
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=2da46bcb-c1e4-dbde-c4ee-1d6983565dc9@quicinc.com \
--to=quic_jinlmao@quicinc.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bjorn.andersson@linaro.org \
--cc=coresight@lists.linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=konradybcio@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=quic_hazha@quicinc.com \
--cc=quic_taozha@quicinc.com \
--cc=quic_tingweiz@quicinc.com \
--cc=quic_tsoni@quicinc.com \
--cc=quic_yuanfang@quicinc.com \
--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®