From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: mike.leach@linaro.org, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, coresight@lists.linaro.org,
linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
robh+dt@kernel.org, maxime@cerno.tech, liviu.dudau@arm.com,
sudeep.holla@arm.com, lorenzo.pieralisi@arm.com,
agross@kernel.org, corbet@lwn.net
Subject: Re: [PATCH v9 08/15] coresight: cti: Enable CTI associated with devices.
Date: Fri, 21 Feb 2020 09:51:34 -0700 [thread overview]
Message-ID: <20200221165134.GA25043@xps15> (raw)
In-Reply-To: <04b739fd-7bb3-bd28-8013-918e7d4dfcb7@arm.com>
On Fri, Feb 21, 2020 at 12:20:17AM +0000, Suzuki K Poulose wrote:
> Hi Mike
>
> Sorry for the delay. one minor comment below.
>
> On 02/10/2020 09:39 PM, Mike Leach wrote:
> > The CoreSight subsystem enables a path of devices from source to sink.
> > Any CTI devices associated with the path devices must be enabled at the
> > same time.
> >
> > This patch adds an associated coresight_device element to the main
> > coresight device structure, and uses this to create associations between
> > the CTI and other devices based on the device tree data. The associated
> > device element is used to enable CTI in conjunction with the path elements.
> >
> > CTI devices are reference counted so where a single CTI is associated with
> > multiple elements on the path, it will be enabled on the first associated
> > device enable, and disabled with the last associated device disable.
> >
> > Signed-off-by: Mike Leach <mike.leach@linaro.org>
> > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > ---
> > drivers/hwtracing/coresight/coresight-cti.c | 129 +++++++++++++++++++
> > drivers/hwtracing/coresight/coresight-cti.h | 1 +
> > drivers/hwtracing/coresight/coresight-priv.h | 12 ++
> > drivers/hwtracing/coresight/coresight.c | 71 +++++++++-
> > include/linux/coresight.h | 4 +
> > 5 files changed, 212 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/hwtracing/coresight/coresight-cti.c b/drivers/hwtracing/coresight/coresight-cti.c
> > index 77c2af247917..c4494923d030 100644
> > --- a/drivers/hwtracing/coresight/coresight-cti.c
> > +++ b/drivers/hwtracing/coresight/coresight-cti.c
> > @@ -4,6 +4,7 @@
> > * Author: Mike Leach <mike.leach@linaro.org>
> > */
> > +#include <linux/property.h>
> > #include "coresight-cti.h"
> > /**
> > @@ -440,6 +441,131 @@ int cti_channel_setop(struct device *dev, enum cti_chan_set_op op,
> > return err;
> > }
> > +/*
> > + * Look for a matching connection device name in the list of connections.
> > + * If found then swap in the csdev name, set trig con association pointer
> > + * and return found.
> > + */
> > +static bool
> > +cti_match_fixup_csdev(struct cti_device *ctidev, const char *node_name,
> > + struct coresight_device *csdev)
> > +{
> > + struct cti_trig_con *tc;
> > + const char *csdev_name;
> > +
> > + list_for_each_entry(tc, &ctidev->trig_cons, node) {
> > + if (tc->con_dev_name) {
> > + if (!strcmp(node_name, tc->con_dev_name)) {
> > + /* match: so swap in csdev name & dev */
> > + csdev_name = dev_name(&csdev->dev);
> > + tc->con_dev_name =
> > + devm_kstrdup(&csdev->dev, csdev_name,
> > + GFP_KERNEL);
>
> In the extreme rare case of an allocation failure, we may want to
> check if the allocation was successful or not, rather than silently
> ignoring it. With that fixed,
Line 419 and 423 in patch 1 need the same attention.
>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com,
linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
coresight@lists.linaro.org, corbet@lwn.net, liviu.dudau@arm.com,
agross@kernel.org, robh+dt@kernel.org, maxime@cerno.tech,
sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org,
mike.leach@linaro.org
Subject: Re: [PATCH v9 08/15] coresight: cti: Enable CTI associated with devices.
Date: Fri, 21 Feb 2020 09:51:34 -0700 [thread overview]
Message-ID: <20200221165134.GA25043@xps15> (raw)
In-Reply-To: <04b739fd-7bb3-bd28-8013-918e7d4dfcb7@arm.com>
On Fri, Feb 21, 2020 at 12:20:17AM +0000, Suzuki K Poulose wrote:
> Hi Mike
>
> Sorry for the delay. one minor comment below.
>
> On 02/10/2020 09:39 PM, Mike Leach wrote:
> > The CoreSight subsystem enables a path of devices from source to sink.
> > Any CTI devices associated with the path devices must be enabled at the
> > same time.
> >
> > This patch adds an associated coresight_device element to the main
> > coresight device structure, and uses this to create associations between
> > the CTI and other devices based on the device tree data. The associated
> > device element is used to enable CTI in conjunction with the path elements.
> >
> > CTI devices are reference counted so where a single CTI is associated with
> > multiple elements on the path, it will be enabled on the first associated
> > device enable, and disabled with the last associated device disable.
> >
> > Signed-off-by: Mike Leach <mike.leach@linaro.org>
> > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > ---
> > drivers/hwtracing/coresight/coresight-cti.c | 129 +++++++++++++++++++
> > drivers/hwtracing/coresight/coresight-cti.h | 1 +
> > drivers/hwtracing/coresight/coresight-priv.h | 12 ++
> > drivers/hwtracing/coresight/coresight.c | 71 +++++++++-
> > include/linux/coresight.h | 4 +
> > 5 files changed, 212 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/hwtracing/coresight/coresight-cti.c b/drivers/hwtracing/coresight/coresight-cti.c
> > index 77c2af247917..c4494923d030 100644
> > --- a/drivers/hwtracing/coresight/coresight-cti.c
> > +++ b/drivers/hwtracing/coresight/coresight-cti.c
> > @@ -4,6 +4,7 @@
> > * Author: Mike Leach <mike.leach@linaro.org>
> > */
> > +#include <linux/property.h>
> > #include "coresight-cti.h"
> > /**
> > @@ -440,6 +441,131 @@ int cti_channel_setop(struct device *dev, enum cti_chan_set_op op,
> > return err;
> > }
> > +/*
> > + * Look for a matching connection device name in the list of connections.
> > + * If found then swap in the csdev name, set trig con association pointer
> > + * and return found.
> > + */
> > +static bool
> > +cti_match_fixup_csdev(struct cti_device *ctidev, const char *node_name,
> > + struct coresight_device *csdev)
> > +{
> > + struct cti_trig_con *tc;
> > + const char *csdev_name;
> > +
> > + list_for_each_entry(tc, &ctidev->trig_cons, node) {
> > + if (tc->con_dev_name) {
> > + if (!strcmp(node_name, tc->con_dev_name)) {
> > + /* match: so swap in csdev name & dev */
> > + csdev_name = dev_name(&csdev->dev);
> > + tc->con_dev_name =
> > + devm_kstrdup(&csdev->dev, csdev_name,
> > + GFP_KERNEL);
>
> In the extreme rare case of an allocation failure, we may want to
> check if the allocation was successful or not, rather than silently
> ignoring it. With that fixed,
Line 419 and 423 in patch 1 need the same attention.
>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-02-21 16:51 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 21:39 [PATCH v9 00/15] CoreSight CTI Driver Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 01/15] coresight: cti: Initial " Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-21 17:06 ` Mathieu Poirier
2020-02-21 17:06 ` Mathieu Poirier
2020-02-24 14:07 ` Mike Leach
2020-02-24 14:07 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 02/15] coresight: cti: Add sysfs coresight mgmt reg access Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 03/15] coresight: cti: Add sysfs access to program function regs Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 04/15] coresight: cti: Add sysfs trigger / channel programming API Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 05/15] dt-bindings: arm: Adds CoreSight CTI hardware definitions Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 06/15] coresight: cti: Add device tree support for v8 arch CTI Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 07/15] coresight: cti: Add device tree support for custom CTI Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 08/15] coresight: cti: Enable CTI associated with devices Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-17 23:12 ` Mathieu Poirier
2020-02-17 23:12 ` Mathieu Poirier
2020-02-21 0:20 ` Suzuki K Poulose
2020-02-21 0:20 ` Suzuki K Poulose
2020-02-21 16:51 ` Mathieu Poirier [this message]
2020-02-21 16:51 ` Mathieu Poirier
2020-02-25 15:03 ` Mike Leach
2020-02-25 15:03 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 09/15] coresight: cti: Add connection information to sysfs Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 10/15] dt-bindings: qcom: Add CTI options for qcom msm8916 Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 11/15] dt-bindings: arm: Juno platform - add CTI entries to device tree Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-11 11:59 ` Sudeep Holla
2020-02-11 11:59 ` Sudeep Holla
2020-02-12 22:12 ` Mathieu Poirier
2020-02-12 22:12 ` Mathieu Poirier
2020-02-13 11:08 ` Sudeep Holla
2020-02-13 11:08 ` Sudeep Holla
2020-02-10 21:39 ` [PATCH v9 12/15] dt-bindings: hisilicon: Add CTI bindings for hi-6220 Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 13/15] docs: coresight: Update documentation for CoreSight to cover CTI Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 14/15] docs: sysfs: coresight: Add sysfs ABI documentation for CTI Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-10 21:39 ` [PATCH v9 15/15] Update MAINTAINERS to add reviewer for CoreSight Mike Leach
2020-02-10 21:39 ` Mike Leach
2020-02-24 15:46 ` [PATCH v9 00/15] CoreSight CTI Driver Marc Gonzalez
2020-02-24 15:46 ` Marc Gonzalez
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=20200221165134.GA25043@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=agross@kernel.org \
--cc=corbet@lwn.net \
--cc=coresight@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=maxime@cerno.tech \
--cc=mike.leach@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sudeep.holla@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.