From: sashiko-bot@kernel.org
To: "Aviv Bakal" <avivb@amazon.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 2/2] perf/arm-cmn: Add workarounds for CMN-S3 on Graviton5
Date: Sun, 24 May 2026 16:40:21 +0000 [thread overview]
Message-ID: <20260524164021.B82541F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260524153848.16334-3-avivb@amazon.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Setting the DTC node's logical ID to the parent XP's logical ID breaks the DTC array indexing, leading to incorrect PMU event programming and IRQ routing.
--
commit 20d5a81cc2d5eb87a70576532c9a783cb6e011c3
Author: Aviv Bakal <avivb@amazon.com>
perf/arm-cmn: Add workarounds for CMN-S3 on Graviton5
This commit introduces workarounds for a custom CMN-S3 implementation on
Graviton5 where certain discovery registers report zeroed fields. It adds
a dedicated ACPI HID and derives the DTC domain and logical ID from the
XP node.
> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c
[ ... ]
> @@ -2419,6 +2443,10 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
>
> switch (dn->type) {
> case CMN_TYPE_DTC:
> + if (graviton5_workaround) {
> + /* Node info logical ID is zeroed; use the XP's */
> + dn->logid = xp->logid;
[Severity: High]
Will setting the DTC's logical ID to the parent XP's logical ID break the
DTC array indexing?
For standard CMN hardware, a DTC's logid is its Domain ID. Nodes are sorted
by type and logid, which means DTCs naturally sort by Domain ID.
By using the XP's logid instead, the DTCs will be sorted by their physical
XP order rather than their Domain ID. The cmn->dtc array and ACPI IRQs are
populated sequentially based on this sorted order.
Later, when programming PMU events, the driver indexes into the cmn->dtc
array using the Domain ID:
d = max_t(int, dn->dtc, 0);
If the physical XP sort order doesn't match the Domain ID order, will this
cause PMU events to be programmed into the wrong hardware blocks and
misroute IRQs?
Could this be assigned the Domain ID directly using dn->logid = xp->dtc?
> + }
> cmn->num_dtcs++;
> dn++;
> break;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260524153848.16334-1-avivb@amazon.com?part=2
next prev parent reply other threads:[~2026-05-24 16:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-03 15:51 [PATCH] perf/arm-cmn: Add workarounds for CMN-S3 on Graviton5 Aviv Bakal
2026-05-03 16:20 ` sashiko-bot
2026-05-04 13:37 ` Aviv Bakal
2026-05-04 13:39 ` [PATCH v2] " Aviv Bakal
2026-05-04 19:38 ` sashiko-bot
2026-05-05 2:31 ` kernel test robot
2026-05-21 16:02 ` Robin Murphy
2026-05-24 15:38 ` [PATCH v3 0/2] " Aviv Bakal
2026-05-24 15:38 ` [PATCH v3 1/2] perf/arm-cmn: Move struct arm_cmn_hw_event into struct hw_perf_event Aviv Bakal
2026-05-24 16:13 ` sashiko-bot
2026-05-29 16:44 ` Robin Murphy
2026-05-24 15:38 ` [PATCH v3 2/2] perf/arm-cmn: Add workarounds for CMN-S3 on Graviton5 Aviv Bakal
2026-05-24 16:40 ` sashiko-bot [this message]
2026-05-31 11:04 ` [PATCH v4 0/2] " Aviv Bakal
2026-05-31 11:04 ` [PATCH v4 1/2] perf/arm-cmn: Move DTM index data out of hw_perf_event Aviv Bakal
2026-06-01 18:23 ` Robin Murphy
2026-06-02 5:49 ` Ilkka Koskinen
2026-05-31 11:04 ` [PATCH v4 2/2] perf/arm-cmn: Add workarounds for CMN-S3 on Graviton5 Aviv Bakal
2026-05-31 11:32 ` sashiko-bot
2026-06-01 17:45 ` Robin Murphy
2026-06-03 14:57 ` Aviv Bakal
2026-06-01 17:48 ` Robin Murphy
2026-06-02 5:55 ` Ilkka Koskinen
2026-06-03 15:00 ` [PATCH v5 0/2] " Aviv Bakal
2026-06-03 15:00 ` [PATCH v5 1/2] perf/arm-cmn: Move DTM index data out of hw_perf_event Aviv Bakal
2026-06-03 15:21 ` sashiko-bot
2026-06-03 15:00 ` [PATCH v5 2/2] perf/arm-cmn: Add workarounds for CMN-S3 on Graviton5 Aviv Bakal
2026-06-03 15:53 ` sashiko-bot
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=20260524164021.B82541F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=avivb@amazon.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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