From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Mike Leach <mike.leach@linaro.org>
Subject: Re: [PATCH 01/13] coresight: cti: Initial CoreSight CTI Driver
Date: Wed, 18 Mar 2020 12:12:26 -0600 [thread overview]
Message-ID: <20200318181226.GA18359@xps15> (raw)
In-Reply-To: <20200318132241.GB2789508@kroah.com>
On Wed, Mar 18, 2020 at 02:22:41PM +0100, Greg KH wrote:
> On Mon, Mar 09, 2020 at 10:17:36AM -0600, Mathieu Poirier wrote:
> > From: Mike Leach <mike.leach@linaro.org>
> >
> > This introduces a baseline CTI driver and associated configuration files.
> >
> > Uses the platform agnostic naming standard for CoreSight devices, along
> > with a generic platform probing method that currently supports device
> > tree descriptions, but allows for the ACPI bindings to be added once these
> > have been defined for the CTI devices.
> >
> > Driver will probe for the device on the AMBA bus, and load the CTI driver
> > on CoreSight ID match to CTI IDs in tables.
> >
> > Initial sysfs support for enable / disable provided.
> >
> > Default CTI interconnection data is generated based on hardware
> > register signal counts, with no additional connection information.
> >
> > Signed-off-by: Mike Leach <mike.leach@linaro.org>
> > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> > Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>
> You didn't cc: all of them to get review comments? I've added it
> above...
Thanks
>
> And signed-off-by implies reviewed-by.
This set has been refined over several iterations. I added my R-b to patches
that I had reviewed and did not need attentions anymore. Since this is supposed
to be a chain of custody I decided to keep my R-b and append my S-b before
queueing in my tree. I have seen this done many times before but will remove if
you think it is better.
>
> > +/* basic attributes */
> > +static ssize_t enable_show(struct device *dev,
> > + struct device_attribute *attr,
> > + char *buf)
> > +{
> > + int enable_req;
> > + bool enabled, powered;
> > + struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent);
> > + ssize_t size = 0;
> > +
> > + enable_req = atomic_read(&drvdata->config.enable_req_count);
> > + spin_lock(&drvdata->spinlock);
> > + powered = drvdata->config.hw_powered;
> > + enabled = drvdata->config.hw_enabled;
> > + spin_unlock(&drvdata->spinlock);
> > +
> > + if (powered) {
> > + size = scnprintf(buf, PAGE_SIZE, "cti %s; powered;\n",
> > + enabled ? "enabled" : "disabled");
> > + } else {
> > + size = scnprintf(buf, PAGE_SIZE, "cti %s; unpowered;\n",
> > + enable_req ? "enable req" : "disabled");
>
> sysfs files should never need scnprintf() as you "know" a single value
> will fit into a PAGE_SIZE.
I've seen many patches using scnprintf() that were merged. We can change this
to sprintf().
>
> And shouldn't this just be a single value, this looks like it is 2
> values in one line, that then needs to be parsed, is that to be
> expected?
There is no shortage of files under /sys/device/ with output that needs parsing,
but this can be split in two entries.
>
> Where is the documentation for this new sysfs file?
All the documentation for sysfs files are lumped together in a single patch [1]
that is also part of this set.
[1]. https://lkml.org/lkml/2020/3/9/643
>
> > +const struct attribute_group *coresight_cti_groups[] = {
> > + &coresight_cti_group,
> > + NULL,
> > +};
>
> ATTRIBUTE_GROUPS()?
As with all the other coresight devices, groups are communicated to
coresight_register() and added to the csdev->dev in that function.
>
> > +static struct amba_driver cti_driver = {
> > + .drv = {
> > + .name = "coresight-cti",
> > + .owner = THIS_MODULE,
>
> Aren't amba drivers smart enough to set this properly on their own?
> {sigh}
Would you mind indicating where? builtin_amba_driver() calls
amba_driver_register() and that doesn't set the owner field.
Thanks,
Mathieu
>
> greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Mike Leach <mike.leach@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/13] coresight: cti: Initial CoreSight CTI Driver
Date: Wed, 18 Mar 2020 12:12:26 -0600 [thread overview]
Message-ID: <20200318181226.GA18359@xps15> (raw)
In-Reply-To: <20200318132241.GB2789508@kroah.com>
On Wed, Mar 18, 2020 at 02:22:41PM +0100, Greg KH wrote:
> On Mon, Mar 09, 2020 at 10:17:36AM -0600, Mathieu Poirier wrote:
> > From: Mike Leach <mike.leach@linaro.org>
> >
> > This introduces a baseline CTI driver and associated configuration files.
> >
> > Uses the platform agnostic naming standard for CoreSight devices, along
> > with a generic platform probing method that currently supports device
> > tree descriptions, but allows for the ACPI bindings to be added once these
> > have been defined for the CTI devices.
> >
> > Driver will probe for the device on the AMBA bus, and load the CTI driver
> > on CoreSight ID match to CTI IDs in tables.
> >
> > Initial sysfs support for enable / disable provided.
> >
> > Default CTI interconnection data is generated based on hardware
> > register signal counts, with no additional connection information.
> >
> > Signed-off-by: Mike Leach <mike.leach@linaro.org>
> > Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> > Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> > Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>
> You didn't cc: all of them to get review comments? I've added it
> above...
Thanks
>
> And signed-off-by implies reviewed-by.
This set has been refined over several iterations. I added my R-b to patches
that I had reviewed and did not need attentions anymore. Since this is supposed
to be a chain of custody I decided to keep my R-b and append my S-b before
queueing in my tree. I have seen this done many times before but will remove if
you think it is better.
>
> > +/* basic attributes */
> > +static ssize_t enable_show(struct device *dev,
> > + struct device_attribute *attr,
> > + char *buf)
> > +{
> > + int enable_req;
> > + bool enabled, powered;
> > + struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent);
> > + ssize_t size = 0;
> > +
> > + enable_req = atomic_read(&drvdata->config.enable_req_count);
> > + spin_lock(&drvdata->spinlock);
> > + powered = drvdata->config.hw_powered;
> > + enabled = drvdata->config.hw_enabled;
> > + spin_unlock(&drvdata->spinlock);
> > +
> > + if (powered) {
> > + size = scnprintf(buf, PAGE_SIZE, "cti %s; powered;\n",
> > + enabled ? "enabled" : "disabled");
> > + } else {
> > + size = scnprintf(buf, PAGE_SIZE, "cti %s; unpowered;\n",
> > + enable_req ? "enable req" : "disabled");
>
> sysfs files should never need scnprintf() as you "know" a single value
> will fit into a PAGE_SIZE.
I've seen many patches using scnprintf() that were merged. We can change this
to sprintf().
>
> And shouldn't this just be a single value, this looks like it is 2
> values in one line, that then needs to be parsed, is that to be
> expected?
There is no shortage of files under /sys/device/ with output that needs parsing,
but this can be split in two entries.
>
> Where is the documentation for this new sysfs file?
All the documentation for sysfs files are lumped together in a single patch [1]
that is also part of this set.
[1]. https://lkml.org/lkml/2020/3/9/643
>
> > +const struct attribute_group *coresight_cti_groups[] = {
> > + &coresight_cti_group,
> > + NULL,
> > +};
>
> ATTRIBUTE_GROUPS()?
As with all the other coresight devices, groups are communicated to
coresight_register() and added to the csdev->dev in that function.
>
> > +static struct amba_driver cti_driver = {
> > + .drv = {
> > + .name = "coresight-cti",
> > + .owner = THIS_MODULE,
>
> Aren't amba drivers smart enough to set this properly on their own?
> {sigh}
Would you mind indicating where? builtin_amba_driver() calls
amba_driver_register() and that doesn't set the owner field.
Thanks,
Mathieu
>
> greg k-h
next prev parent reply other threads:[~2020-03-18 18:12 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 16:17 [PATCH 00/13] coresight: next v5.6-rc5 Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 01/13] coresight: cti: Initial CoreSight CTI Driver Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-18 13:22 ` Greg KH
2020-03-18 13:22 ` Greg KH
2020-03-18 18:12 ` Mathieu Poirier [this message]
2020-03-18 18:12 ` Mathieu Poirier
2020-03-18 18:15 ` Mathieu Poirier
2020-03-18 18:15 ` Mathieu Poirier
2020-03-18 18:23 ` Greg KH
2020-03-18 18:23 ` Greg KH
2020-03-09 16:17 ` [PATCH 02/13] coresight: cti: Add sysfs coresight mgmt register access Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-18 13:18 ` Greg KH
2020-03-18 13:18 ` Greg KH
2020-03-18 18:16 ` Mathieu Poirier
2020-03-18 18:16 ` Mathieu Poirier
2020-03-18 18:22 ` Greg KH
2020-03-18 18:22 ` Greg KH
2020-03-18 19:28 ` Mathieu Poirier
2020-03-18 19:28 ` Mathieu Poirier
2020-03-19 7:54 ` Greg KH
2020-03-19 7:54 ` Greg KH
2020-03-19 14:40 ` Mathieu Poirier
2020-03-19 14:40 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 03/13] coresight: cti: Add sysfs access to program function registers Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-18 13:23 ` Greg KH
2020-03-18 13:23 ` Greg KH
2020-03-09 16:17 ` [PATCH 04/13] coresight: cti: Add sysfs trigger / channel programming API Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 05/13] dt-bindings: arm: Adds CoreSight CTI hardware definitions Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 06/13] coresight: cti: Add device tree support for v8 arch CTI Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 07/13] coresight: cti: Add device tree support for custom CTI Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 08/13] coresight: cti: Enable CTI associated with devices Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 09/13] coresight: cti: Add connection information to sysfs Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 10/13] docs: coresight: Update documentation for CoreSight to cover CTI Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 11/13] docs: sysfs: coresight: Add sysfs ABI documentation for CTI Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 12/13] Update MAINTAINERS to add reviewer for CoreSight Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
2020-03-09 16:17 ` [PATCH 13/13] coresight: cti: Remove unnecessary NULL check in cti_sig_type_name Mathieu Poirier
2020-03-09 16:17 ` Mathieu Poirier
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=20200318181226.GA18359@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.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 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.