All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Robin Murphy" <robin.murphy@arm.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 4/5] perf/arm-cmn: Plumb in new filter types
Date: Tue, 28 Jul 2026 16:43:11 +0000	[thread overview]
Message-ID: <20260728164311.AE7DC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <90465c737b71be5d39c3662c7ba07ab6a1326009.1785252273.git.robin.murphy@arm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly introduced filter types (SEL_EVICT_STATE_SEL, SEL_ENHANCED_HBT_LBT_SEL, SEL_SNP_VC_SEL) are not mapped to any hardware bitmasks in `arm_cmn_filters`, causing them to be silently ignored when programming the PMU hardware.
--

--- Patch [4]: [PATCH v2 4/5] perf/arm-cmn: Plumb in new filter types ---
commit b05e0afda744759b2e246b65abc52e94120966e6
Author: Robin Murphy <robin.murphy@arm.com>

perf/arm-cmn: Plumb in new filter types

This commit adds logic to handle events with upcoming new filter controls,
special-casing the EVICT_STATE_SEL events which require HBT_LBT_SEL as a
secondary filter.

> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> index 6536f0ec699b7..9d5833f8cff2b 100644
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c

[ ... ]

> @@ -284,6 +286,9 @@ enum cmn_filter_select {
>  	SEL_CBUSY_SNTHROTTLE_SEL,
>  	SEL_HBT_LBT_SEL,
>  	SEL_SN_HOME_SEL,
> +	SEL_SNP_VC_SEL,
> +	SEL_ENHANCED_HBT_LBT_SEL,
> +	SEL_EVICT_STATE_SEL,
>  	SEL_MAX
>  };

[Severity: Medium]
Will these newly introduced filter types be silently ignored when programming the
PMU hardware?

It looks like they are not mapped to any hardware bitmasks in the
arm_cmn_filters translation array:

drivers/perf/arm-cmn.c:
static const u64 arm_cmn_filters[][SEL_MAX] = {
	[FILT_NONE] = {},
	/* DVM etc. */

Because missing entries default to 0, arm_cmn_set_event_sel_hi() appears to
bypass them when preparing the register payload:

drivers/perf/arm-cmn.c:arm_cmn_set_event_sel_hi() {
    ...
		for (int i = SEL_OCCUP1_ID; i < SEL_MAX; i++) {
			if (filter[i])
				reg |= field_prep(filter[i], dn->filter[i].val);
		}
    ...
}

Should the arm_cmn_filters array be updated to include bitmasks for these new
selectors?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1785252273.git.robin.murphy@arm.com?part=4

  reply	other threads:[~2026-07-28 16:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 15:59 [PATCH v2 0/5] perf/arm-cmn: Support CMN S3 r2 Robin Murphy
2026-07-28 15:59 ` [PATCH v2 1/5] perf/arm-cmn: Rename filter variables for clarity Robin Murphy
2026-07-28 15:59 ` [PATCH v2 2/5] perf/arm-cmn: Refactor event filter programming Robin Murphy
2026-07-28 15:59 ` [PATCH v2 3/5] perf/arm-cmn: Refactor event filter data Robin Murphy
2026-07-28 15:59 ` [PATCH v2 4/5] perf/arm-cmn: Plumb in new filter types Robin Murphy
2026-07-28 16:43   ` sashiko-bot [this message]
2026-07-28 15:59 ` [PATCH v2 5/5] perf/arm-cmn: Support CMN S3 r2 Robin Murphy
2026-07-28 16:57   ` sashiko-bot
2026-07-28 17:16     ` Robin Murphy

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=20260728164311.AE7DC1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --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 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.