From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: James Clark <james.clark@arm.com>
Cc: suzuki.poulose@arm.com, coresight@lists.linaro.org,
mike.leach@linaro.org, leo.yan@linaro.org,
linux-kernel@vger.kernel.org, german.gomez@arm.com,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH v2 0/5] coresight: Reduce duplicated sysfs accessors
Date: Wed, 31 Aug 2022 10:58:23 -0600 [thread overview]
Message-ID: <20220831165823.GB217472@p14s> (raw)
In-Reply-To: <20220830172614.340962-1-james.clark@arm.com>
I have applied this set.
Thanks,
Mathieu
On Tue, Aug 30, 2022 at 06:26:08PM +0100, James Clark wrote:
> Changes since v1:
>
> * Keep existing signed offset value types until the very last commit
> and then remove them all at once
>
> * Also split out usages of read_pair() and read32() into separate
> functions in the last commit
>
> * Whitespace fixes
>
> * Replaced any touched scnprintf() with sysfs_emit()
>
> ======
>
> The intent of this change is to reduce the large number identical of
> functions created by macros for sysfs accessors. It's possible to re-use
> the same function but pass in the register to access as an argument.
> This reduces the size of the coresight modules folder by 244KB.
>
> The first two patches are refactors to simplify and remove some dead
> code, and the second two are the changes to use a shared function.
>
> Testing
> =======
>
> No changes in any of the outputs:
>
> cat /sys/bus/coresight/devices/*/mgmt/* > before.txt
> cat /sys/bus/coresight/devices/*/mgmt/* > after.txt
> diff before.txt after.txt
>
> With the following modules loaded:
>
> ls /sys/bus/coresight/devices/
> etm0 etm2 funnel0 funnel2 replicator0 tmc_etf0 tmc_etf2 tpiu0
> etm1 etm3 funnel1 funnel3 stm0 tmc_etf1 tmc_etr0
>
>
> James Clark (5):
> coresight: Remove unused function parameter
> coresight: Simplify sysfs accessors by using csdev_access abstraction
> coresight: Re-use same function for similar sysfs register accessors
> coresight: cti-sysfs: Re-use same functions for similar sysfs register
> accessors
> coresight: Make new csdev_access offsets unsigned
>
> drivers/hwtracing/coresight/coresight-catu.c | 27 +--
> drivers/hwtracing/coresight/coresight-catu.h | 8 +-
> drivers/hwtracing/coresight/coresight-core.c | 28 +++
> .../hwtracing/coresight/coresight-cti-sysfs.c | 213 +++++++-----------
> drivers/hwtracing/coresight/coresight-etb10.c | 28 +--
> .../coresight/coresight-etm3x-sysfs.c | 34 +--
> drivers/hwtracing/coresight/coresight-priv.h | 74 +++---
> .../coresight/coresight-replicator.c | 10 +-
> drivers/hwtracing/coresight/coresight-stm.c | 40 +---
> .../hwtracing/coresight/coresight-tmc-core.c | 48 ++--
> drivers/hwtracing/coresight/coresight-tmc.h | 4 +-
> include/linux/coresight.h | 23 ++
> 12 files changed, 227 insertions(+), 310 deletions(-)
>
> --
> 2.28.0
>
_______________________________________________
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: James Clark <james.clark@arm.com>
Cc: suzuki.poulose@arm.com, coresight@lists.linaro.org,
mike.leach@linaro.org, leo.yan@linaro.org,
linux-kernel@vger.kernel.org, german.gomez@arm.com,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH v2 0/5] coresight: Reduce duplicated sysfs accessors
Date: Wed, 31 Aug 2022 10:58:23 -0600 [thread overview]
Message-ID: <20220831165823.GB217472@p14s> (raw)
In-Reply-To: <20220830172614.340962-1-james.clark@arm.com>
I have applied this set.
Thanks,
Mathieu
On Tue, Aug 30, 2022 at 06:26:08PM +0100, James Clark wrote:
> Changes since v1:
>
> * Keep existing signed offset value types until the very last commit
> and then remove them all at once
>
> * Also split out usages of read_pair() and read32() into separate
> functions in the last commit
>
> * Whitespace fixes
>
> * Replaced any touched scnprintf() with sysfs_emit()
>
> ======
>
> The intent of this change is to reduce the large number identical of
> functions created by macros for sysfs accessors. It's possible to re-use
> the same function but pass in the register to access as an argument.
> This reduces the size of the coresight modules folder by 244KB.
>
> The first two patches are refactors to simplify and remove some dead
> code, and the second two are the changes to use a shared function.
>
> Testing
> =======
>
> No changes in any of the outputs:
>
> cat /sys/bus/coresight/devices/*/mgmt/* > before.txt
> cat /sys/bus/coresight/devices/*/mgmt/* > after.txt
> diff before.txt after.txt
>
> With the following modules loaded:
>
> ls /sys/bus/coresight/devices/
> etm0 etm2 funnel0 funnel2 replicator0 tmc_etf0 tmc_etf2 tpiu0
> etm1 etm3 funnel1 funnel3 stm0 tmc_etf1 tmc_etr0
>
>
> James Clark (5):
> coresight: Remove unused function parameter
> coresight: Simplify sysfs accessors by using csdev_access abstraction
> coresight: Re-use same function for similar sysfs register accessors
> coresight: cti-sysfs: Re-use same functions for similar sysfs register
> accessors
> coresight: Make new csdev_access offsets unsigned
>
> drivers/hwtracing/coresight/coresight-catu.c | 27 +--
> drivers/hwtracing/coresight/coresight-catu.h | 8 +-
> drivers/hwtracing/coresight/coresight-core.c | 28 +++
> .../hwtracing/coresight/coresight-cti-sysfs.c | 213 +++++++-----------
> drivers/hwtracing/coresight/coresight-etb10.c | 28 +--
> .../coresight/coresight-etm3x-sysfs.c | 34 +--
> drivers/hwtracing/coresight/coresight-priv.h | 74 +++---
> .../coresight/coresight-replicator.c | 10 +-
> drivers/hwtracing/coresight/coresight-stm.c | 40 +---
> .../hwtracing/coresight/coresight-tmc-core.c | 48 ++--
> drivers/hwtracing/coresight/coresight-tmc.h | 4 +-
> include/linux/coresight.h | 23 ++
> 12 files changed, 227 insertions(+), 310 deletions(-)
>
> --
> 2.28.0
>
next prev parent reply other threads:[~2022-08-31 16:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 17:26 [PATCH v2 0/5] coresight: Reduce duplicated sysfs accessors James Clark
2022-08-30 17:26 ` James Clark
2022-08-30 17:26 ` [PATCH v2 1/5] coresight: Remove unused function parameter James Clark
2022-08-30 17:26 ` James Clark
2022-08-31 8:11 ` Mike Leach
2022-08-31 8:11 ` Mike Leach
2022-08-30 17:26 ` [PATCH v2 2/5] coresight: Simplify sysfs accessors by using csdev_access abstraction James Clark
2022-08-30 17:26 ` James Clark
2022-08-31 9:22 ` Mike Leach
2022-08-31 9:22 ` Mike Leach
2022-08-30 17:26 ` [PATCH v2 3/5] coresight: Re-use same function for similar sysfs register accessors James Clark
2022-08-30 17:26 ` James Clark
2022-08-31 9:32 ` Mike Leach
2022-08-31 9:32 ` Mike Leach
2022-08-30 17:26 ` [PATCH v2 4/5] coresight: cti-sysfs: Re-use same functions " James Clark
2022-08-30 17:26 ` James Clark
2022-08-31 9:51 ` Mike Leach
2022-08-31 9:51 ` Mike Leach
2022-08-30 17:26 ` [PATCH v2 5/5] coresight: Make new csdev_access offsets unsigned James Clark
2022-08-30 17:26 ` James Clark
2022-08-31 10:14 ` Mike Leach
2022-08-31 10:14 ` Mike Leach
2022-08-31 16:58 ` Mathieu Poirier [this message]
2022-08-31 16:58 ` [PATCH v2 0/5] coresight: Reduce duplicated sysfs accessors 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=20220831165823.GB217472@p14s \
--to=mathieu.poirier@linaro.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=coresight@lists.linaro.org \
--cc=german.gomez@arm.com \
--cc=james.clark@arm.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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=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.