From: Vladimir Kondratiev <Vladimir.Kondratiev@mobileye.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-rt-devel@lists.linux.dev, devicetree@vger.kernel.org,
linux-perf-users@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/6] perf: add MIPS Coherence Manager 3 (CM3) PMU driver
Date: Wed, 18 Nov 2026 19:21:41 +0200 [thread overview]
Message-ID: <962f81ac-2a4f-4b15-9f73-2065ed513af4@mobileye.com> (raw)
In-Reply-To: <sashiko-outbox-211133@kernel.org>
On 11/12/26 15:02, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issues to consider:
> - [Medium] perf: mips_cm3_pmu: counter overflow double-counting in
> cm3_pmu_update()
> - [Low] perf: mips_cm3_pmu: broken !MIPS_CPS / !SMP configuration
> --
>
> commit 272d1a9241643c479b7f4cabbd1c40edccbe1b16
> Author: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
>
> perf: add MIPS Coherence Manager 3 (CM3) PMU driver
>
> This commit adds an uncore PMU driver and documentation for the MIPS
> Coherence Manager 3 (CM3) performance and cycle counters.
>
>> diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
>> index 245e7bb763b99..2dbed2fc7b030 100644
>> --- a/drivers/perf/Kconfig
>> +++ b/drivers/perf/Kconfig
>> @@ -75,6 +75,18 @@ config ARM_XSCALE_PMU
>> depends on ARM_PMU && CPU_XSCALE
>> def_bool y
>>
>> +config MIPS_CM3_PMU
>> + tristate "MIPS Coherence Manager 3 (CM3) PMU"
>> + depends on MIPS_CM
> [Severity: Low]
> Should MIPS_CM3_PMU depend on MIPS_CPS rather than MIPS_CM?
>
> MIPS_GIC selects MIPS_CM even when CONFIG_MIPS_CPS=n and CONFIG_SMP=n.
> On a !CONFIG_SMP build, irq_set_affinity() is a stub returning -EINVAL, so
> cm3_pmu_online_cpu() unconditionally triggers WARN_ON() when an overflow
> IRQ is present; without CONFIG_MIPS_CPS, cps_smp_setup() also never
> populates the cluster ID in cpu_data[].globalnumber.
This is a false negative. On a !CONFIG_SMP build:
- cm3_pmu_online_cpu() is a CPU hotplug handler, it won't be called on
the !CONFIG_SMP build.
- cpu_data[].globalnumber will stay 0, so cpu_cluster() will return 0,
and it is true
Thanks, Vladimir
next prev parent reply other threads:[~2026-11-18 17:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 12:28 [PATCH v2 0/6] perf: add PMU driver for the MIPS Coherence Manager 3 performance counters Vladimir Kondratiev
2026-11-12 12:28 ` [PATCH v2 1/6] MIPS: CM: Make cm_core_lock raw spinlocks Vladimir Kondratiev
2026-11-12 12:39 ` sashiko-bot
2026-11-12 12:28 ` [PATCH v2 2/6] MIPS: CM: add CM3 performance counter GCR definitions Vladimir Kondratiev
2026-11-12 12:29 ` [PATCH v2 3/6] MIPS: CM: export the symbols needed to access the GCRs from a module Vladimir Kondratiev
2026-11-12 12:29 ` [PATCH v2 4/6] dt-bindings: mips: mti,mips-cm: add performance counter interrupt Vladimir Kondratiev
2026-11-16 11:47 ` Krzysztof Kozlowski
2026-11-12 12:29 ` [PATCH v2 5/6] perf: add MIPS Coherence Manager 3 (CM3) PMU driver Vladimir Kondratiev
2026-11-12 13:02 ` sashiko-bot
2026-11-18 17:21 ` Vladimir Kondratiev [this message]
2026-11-12 12:29 ` [PATCH v2 6/6] MIPS: eyeq6_defconfig: enable the CM3 PMU Vladimir Kondratiev
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=962f81ac-2a4f-4b15-9f73-2065ed513af4@mobileye.com \
--to=vladimir.kondratiev@mobileye.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=robh@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
all inboxes | Powered by JetHome®