From: Will Deacon <will@kernel.org>
To: Yushan Wang <wangyushan12@huawei.com>
Cc: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, robin.murphy@arm.com,
yangyicong@huawei.com, Jonathan.Cameron@huawei.com,
liuyonglong@huawei.com, wanghuiqiang@huawei.com,
prime.zeng@hisilicon.com, hejunhao3@h-partners.com,
linuxarm@huawei.com, fanghao11@huawei.com
Subject: Re: [PATCH v3 5/9] drivers/perf: hisi: Extend the field of tt_core
Date: Mon, 22 Sep 2025 14:17:05 +0100 [thread overview]
Message-ID: <aNFMUdPJeJo9XU1e@willie-the-truck> (raw)
In-Reply-To: <20250829101427.2557899-6-wangyushan12@huawei.com>
On Fri, Aug 29, 2025 at 06:14:23PM +0800, Yushan Wang wrote:
> From: Yicong Yang <yangyicong@hisilicon.com>
>
> Currently the tt_core's using config1's bit [7, 0] and can not be
> extended. For some platforms there's more the 8 CPUs sharing the
> L3 cache. So make tt_core use config2's bit [15, 0] and the remaining
> bits in config2 is reserved for extension.
>
> Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> Signed-off-by: Yushan Wang <wangyushan12@huawei.com>
> ---
> drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
> index a372dd2c07b5..39444f11cbad 100644
> --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
> +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
> @@ -55,10 +55,10 @@
> #define L3C_V1_NR_EVENTS 0x59
> #define L3C_V2_NR_EVENTS 0xFF
>
> -HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_core, config1, 7, 0);
> HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_req, config1, 10, 8);
> HISI_PMU_EVENT_ATTR_EXTRACTOR(datasrc_cfg, config1, 15, 11);
> HISI_PMU_EVENT_ATTR_EXTRACTOR(datasrc_skt, config1, 16, 16);
> +HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_core, config2, 15, 0);
>
> static void hisi_l3c_pmu_config_req_tracetag(struct perf_event *event)
> {
> @@ -397,7 +397,7 @@ static const struct attribute_group hisi_l3c_pmu_v1_format_group = {
>
> static struct attribute *hisi_l3c_pmu_v2_format_attr[] = {
> HISI_PMU_FORMAT_ATTR(event, "config:0-7"),
> - HISI_PMU_FORMAT_ATTR(tt_core, "config1:0-7"),
> + HISI_PMU_FORMAT_ATTR(tt_core, "config2:0-15"),
> HISI_PMU_FORMAT_ATTR(tt_req, "config1:8-10"),
> HISI_PMU_FORMAT_ATTR(datasrc_cfg, "config1:11-15"),
> HISI_PMU_FORMAT_ATTR(datasrc_skt, "config1:16"),
I'm a _tiny_ bit worried about this change in that it has the potential
to break any users who've hardcoded the 'tt_core' encoding in 'config1'.
Granted, they should be parsing this out of sysfs, but you never know.
If we were going to avoid the possibility of a regression entirely, I
think we'd either need to (a) split the field so that the upper 8 bits
of 'tt_core' live in 'config2' but the bottom 8 bits stay where they
are or (b) leave 'config1:0-7' as an alias of 'config2:0-7'.
The latter is still do-able, as you haven't re-allocated the config1
bits yet.
Will
next prev parent reply other threads:[~2025-09-22 13:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 10:14 [PATCH v3 0/9] Updates of HiSilicon Uncore L3C PMU Yushan Wang
2025-08-29 10:14 ` [PATCH v3 1/9] drivers/perf: hisi: Relax the event ID check in the framework Yushan Wang
2025-08-29 10:14 ` [PATCH v3 2/9] drivers/perf: hisi: Export hisi_uncore_pmu_isr() Yushan Wang
2025-08-29 10:14 ` [PATCH v3 3/9] drivers/perf: hisi: Simplify the probe process of each L3C PMU version Yushan Wang
2025-08-29 10:14 ` [PATCH v3 4/9] drivers/perf: hisi: Extract the event filter check of L3C PMU Yushan Wang
2025-08-29 10:14 ` [PATCH v3 5/9] drivers/perf: hisi: Extend the field of tt_core Yushan Wang
2025-09-22 13:17 ` Will Deacon [this message]
2025-09-23 7:31 ` Yicong Yang
2025-09-24 11:19 ` Will Deacon
2025-09-25 3:59 ` Yicong Yang
2025-08-29 10:14 ` [PATCH v3 6/9] drivers/perf: hisi: Refactor the event configuration of L3C PMU Yushan Wang
2025-08-29 10:14 ` [PATCH v3 7/9] drivers/perf: hisi: Add support for L3C PMU v3 Yushan Wang
2025-08-29 10:14 ` [PATCH v3 8/9] Documentation: hisi-pmu: Fix of minor format error Yushan Wang
2025-08-29 10:14 ` [PATCH v3 9/9] Documentation: hisi-pmu: Add introduction to HiSilicon V3 PMU Yushan Wang
2025-09-01 6:49 ` Yicong Yang
2025-09-11 13:22 ` [PATCH v3 0/9] Updates of HiSilicon Uncore L3C PMU wangyushan
2025-09-22 13:14 ` Will Deacon
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=aNFMUdPJeJo9XU1e@willie-the-truck \
--to=will@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=fanghao11@huawei.com \
--cc=hejunhao3@h-partners.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=mark.rutland@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=robin.murphy@arm.com \
--cc=wanghuiqiang@huawei.com \
--cc=wangyushan12@huawei.com \
--cc=yangyicong@huawei.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