From: Robin Murphy <robin.murphy@arm.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v4 1/4] perf/arm_cspmu: Add Arm system PMU
Date: Fri, 6 Nov 2026 18:31:31 +0000 [thread overview]
Message-ID: <20ab965b-bbe0-4550-be16-24e104e2dac4@arm.com> (raw)
In-Reply-To: <sashiko-outbox-202006@kernel.org>
On 2026-11-06 6:17 pm, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] perf/arm_cspmu: arm_cspmu_init_impl_ops() defers probe when
> ARM_SYSTEM_PMU=n
> --
>
> commit ae4570e49b496427e88dd55c46f9506b33a8b68e
> Author: Robin Murphy <robin.murphy@arm.com>
>
> perf/arm_cspmu: Add Arm system PMU
>
> This commit adds the arm_syspmu backend module to support an additional
> 64-bit event filter register (PMEVFILT3R) on Arm system PMUs with product
> ID 0x9c3.
>
>> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
>> index 912f03ce3ef5f..9f298ea1a9745 100644
>> --- a/drivers/perf/arm_cspmu/arm_cspmu.c
>> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c
>> @@ -358,6 +358,13 @@ static struct arm_cspmu_impl_match impl_match[] = {
>> .module = NULL,
>> .impl_init_ops = NULL,
>> },
>> + {
>> + .module_name = "arm_syspmu",
>> + .pmiidr_val = ARM_CSPMU_IMPL_ID_ARM,
>> + .pmiidr_mask = PMIIDR_IMPLEMENTER,
>> + .module = NULL,
>> + .impl_init_ops = NULL,
>> + },
>> {
>> .module_name = "ampere_cspmu",
>> .pmiidr_val = ARM_CSPMU_IMPL_ID_AMPERE,
>
> [Severity: Medium]
> Does adding an unconditional impl_match[] entry for ARM_CSPMU_IMPL_ID_ARM
> cause arm_cspmu_init_impl_ops() to defer probing indefinitely when
> CONFIG_ARM_SYSTEM_PMU is disabled?
>
> Previously, CoreSight PMUs with Arm's implementer ID did not match any
> entry in impl_match[] and probed using the generic ops. With this entry
> present, arm_cspmu_init_impl_ops() requires the arm_syspmu module to
> register match->impl_init_ops:
>
> drivers/perf/arm_cspmu/arm_cspmu.c:arm_cspmu_init_impl_ops() {
> ...
> if (match->impl_init_ops) {
> ...
> } else {
> request_module_nowait(match->module_name);
> ret = dev_err_probe(cspmu->dev, -EPROBE_DEFER,
> "Waiting for module %s to load\n",
> match->module_name);
> }
> ...
> }
>
> Because CONFIG_ARM_SYSTEM_PMU has no default in Kconfig, existing configs
> with CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU enabled will have
> CONFIG_ARM_SYSTEM_PMU=n, leaving every Arm-implemented CoreSight PMU
> (including non-0x9c3 devices where arm_syspmu_init_ops() is a no-op)
> permanently stuck in -EPROBE_DEFER.
Sure, let me know what other Arm Ltd. PMU implementations those are, and
I'll get back to you with how much I care...
Plus there's nothing here that's any different from the existing Ampere
and NVIDIA cases. Perhaps we could #ifdef the impl_match entries if
anyone really thought it mattered, but that would be a general matter
for the arm_cspmu framework itself, not this patch.
Thanks,
Robin.
next prev parent reply other threads:[~2026-11-06 18:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 18:07 [PATCH v4 0/4] perf: Arm system PMU and BMU drivers Robin Murphy
2026-11-06 18:07 ` [PATCH v4 1/4] perf/arm_cspmu: Add Arm system PMU Robin Murphy
2026-11-06 18:17 ` sashiko-bot
2026-11-06 18:31 ` Robin Murphy [this message]
2026-11-06 18:07 ` [PATCH v4 2/4] perf: Add Arm Bus Monitor Unit driver Robin Murphy
2026-11-06 18:23 ` sashiko-bot
2026-11-06 19:00 ` Robin Murphy
2026-11-06 18:07 ` [PATCH v4 3/4] dt-bindings: perf: Add Arm Bus Monitor Unit Robin Murphy
2026-11-06 18:11 ` sashiko-bot
2026-11-06 18:07 ` [PATCH v4 4/4] perf/arm-bmu: Add Devicetree support Robin Murphy
2026-11-06 18:14 ` 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=20ab965b-bbe0-4550-be16-24e104e2dac4@arm.com \
--to=robin.murphy@arm.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